Part Number Hot Search : 
M74HC160 AN816 EC110 PHN1013 10EL5 OM5320SR TMP01ES AD7871
Product Description
Full Text Search
 

To Download IN16C1058 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 1 octal-uart controller with 256-byte fifo IN16C1058 revision 1.0 ik semicon co., ltd.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 2 contents 1. description .............................................................................................................................. ................. 5 2. features .............................................................................................................................. ...................... 5 3. ordering information .............................................................................................................................. . 6 4. block diagram ............................................................................................................................... ........... 7 5. pin configuration ............................................................................................................................... ...... 8 5.1 pin configuration for 128-pin tqfp (20x20) package ................................................................ 8 5.2 pin description .............................................................................................................................. . 9 modem and serial i/o interface ................................................................................................ .... 10 multiport i/o interfaces ...................................................................................................... ............ 12 multiport i/o interfaces ...................................................................................................... ............ 13 other inte rfaces .............................................................................................................. .............. 13 6. functional description .......................................................................................................................... 14 6.1 normal mode and mio mode ....................................................................................................... 14 6.2 mio mode .............................................................................................................................. ........ 15 6.3 fifo operation ............................................................................................................................. 17 6.4 hardware flow control ................................................................................................................ 17 6.4.1 auto-rts ................................................................................................................ .............. 17 6.4.2 auto-cts ................................................................................................................ .............. 18 6.5 software flow control ................................................................................................................. 19 6.5.1 transmit softwa re flow control .......................................................................................... . 20 6.5.2 receive softwa re flow control ........................................................................................... . 20 6.5.3 xon any function ........................................................................................................ ......... 23 6.5.4 xoff re-tra nsmit function ............................................................................................... ..... 23 6.6 interrupts .............................................................................................................................. ......... 24 6.7 dma operation ............................................................................................................................. 25 6.7.1 single dma transfer (dma mode 0/fifo di sable) .............................................................. 25 6.7.2 block dma transfe r (dma mode 1) ...................................................................................... 26 6.8 sleep mode with auto wake-up .................................................................................................. 26 6.9 programmable baud rate generator ......................................................................................... 27 6.9 break and time-out conditions .................................................................................................. 29 7. uart register descriptions ................................................................................................................ 30 7.1 transmit holding register (thr, page 0) .................................................................................. 34
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 3 7.2 receive buffer register (rbr, page 0) ...................................................................................... 34 7.3 interrupt enable register (ier, page 0) ..................................................................................... 35 7.4 interrupt status register (isr, page 0) ...................................................................................... 36 7.5 fifo control register (fcr, page 0) ......................................................................................... 37 7.6 line control register (lcr, page 0) .......................................................................................... 38 7.7 modem control register (mcr, page 0) .................................................................................... 39 7.8 line status register (lsr, page 0) ............................................................................................ 40 7.9 modem status register (msr, page 0) ...................................................................................... 41 7.10 scratch pad register (spr, page 0) ......................................................................................... 41 7.11 divisor latches (dll, dlm, page 1) ......................................................................................... 41 7.12 global interrupt control register (gicr, page 2) ................................................................... 42 7.13 global interrupt status register (gisr, page 2) ..................................................................... 43 7.14 transmit fifo count register (tcr, page 2) .......................................................................... 43 7.15 receive fifo count register (rcr, page 2) ........................................................................... 44 7.16 flow control status register (fsr, page 2) ............................................................................ 44 7.17 page select register (psr, page 3) ......................................................................................... 45 7.18 auto toggle control register (atr, page 3) ........................................................................... 46 7.19 enhanced feature register (efr, page 3) .............................................................................. 47 7.23 additional feature register (afr, page 4) .............................................................................. 48 7.24 xoff re-transmit count register (xrcr, page 4) ................................................................... 48 7.25 transmit fifo trigger level register (ttr, page 4) .............................................................. 49 7.26 receive fifo trigger level register (rtr, page 4) ............................................................... 49 7.27 flow control upper threshold register (fur, page 4) ......................................................... 49 7.28 flow control lower threshold register (flr, page 4) .......................................................... 49 8. option register descriptions ............................................................................................................... 51 8.1 option registers map .................................................................................................................. 51 8.2 device information register ........................................................................................................ 52 8.3 interface information register .................................................................................................... 53 8.4 interrupt mask register ............................................................................................................... 53 8.5 interrupt poll register .................................................................................................................. 54 9. programmer?s guide ............................................................................................................................. 55 10. electrical characteristics .................................................................................................................... 60 10.1 absolute maximum ratings ...................................................................................................... 60 10.2 power consumption .................................................................................................................. 60 10.3 dc electrical characteristics .................................................................................................... 60
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 4 10.4 ac electrical characteristics .................................................................................................... 61 11.package outline .............................................................................................................................. ...... 66
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 5 1. description IN16C1058 is a octal uart(universal asynchronous receiver/transmitter) with 256-byte fifo supporting maximum communication speed of 5.3mbps. it offers flow control function by hardware or software and signa l lines which can open or close the tx/rx input/output when communicating by rs-422 or rs-485. it can handle eight internal interrupt signals (int0, int1, int2, int3, int4, int5, int6 and int7) with one global interrupt signal line (int) and offers a new ?x off re-transmit? function in addition to xon any character. uart can convert 8-bit parallel data to asynchronous serial data and vice versa. it can transmit 5 to 8-bit letters, program i/o interrupt trigger level and has 256-byte i/o data fifo. uart can generate any baud rate using clock and programmable divisor, transmit data with even, odd or no parity and 1, 1.5, 2 st op bit, and detect break, idle, framing error, fifo overflow and parity error in input data. uart has a software interface for modem controlling. IN16C1058 offers tqfp128 (20x20 body) packages. 2. features 8 channel uart 3.3v operation with 5v tolerant inputs up to 5.3 mbps baud rate (up to 85 mhz oscillator input clock) 256-byte transmit fifo 256-byte receive fifo with error flags industrial temperature range (-40 to +85 ) programmable and selectable transmit and receive fifo trigger levels for dma and interrupt generation software (xon/xoff) / hardware (nrts/ncts) flow control - programmable xon/xoff characters - programmable auto-rts and auto-cts global interrupt mask/poll control optional data flow resume by xon any character control optional data flow additional halt by xoff re-transmit control dedicated pins for automatic bus contro l of rs-422 and rs-485 communications. - rs-422 point to point/multi-drop control - rs-485 echo/non echo control dma signaling capability for both received and transmitted data software selectable baud rate generator prescaler provides additional divide-by-4 function fast data bus access time programmable sleep mode programmable serial interface characteristics
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 6 - 5, 6, 7, or 8-bit characters - even, odd, or no parity bit generation and detection - 1, 1.5, or 2 stop bit generation false start bit detection line break generation and detection fully prioritized interrupt system controls modem control functions (nrts, ncts, ndtr, ndsr, ndcd, and nri) built-in the control logics for multi serial channels - address decoding logic for 8 channels - each serial interface working mode information - option registers for internal interrupt control - expandable up to 32-port without any glue-logics using mio bus 3. ordering information table 1: ordering information part number package operating temperature range device status IN16C1058-tq 128-pin tqfp (20x20) -40 to +85 active
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 7 4. block diagram figure 1: block diagram ua rt 1 ua rt 5 ua rt 7 ua rt 6 generator baud rate clock and ntxrdy/nrxrdy int transmit register sb16c1058 signal ntxrdy 1/nrxrdy 1 control logic nrts2/ndtr2 ntxrdy 2/nrxrdy 2 rxd2 ncts2/ndsr2/ndcd2/nri2 txd 2 ntxrdy 3/nrxrdy 3 txd 3 nrts3/ndtr3 rxd3 ncts3/ndsr3/ndcd3/nri3 xta l 2 rxd4 ntxrdy 4/nrxrdy 4 ncts4/ndsr4/ndcd4/nri4 txd 4 nrts4/ndtr4 nrts5/ndtr5 rxd5 ntxrdy 5/nrxrdy 5 ncts5/ndsr5/ndcd5/nri5 txd 5 ntxrdy 6/nrxrdy 6 ua rt 0 txd 6 nrts6/ndtr6 rxd6 register d[7:0] ncts6/ndsr6/ndcd6/nri6 nrts1/ndtr1 rxd7 ntxrdy 7/nrxrdy 7 ncts7/ndsr7/ndcd7/nri7 txd 7 nrts7/ndtr7 ua rt 2 register clksel shift control logic control register fifo receive txd 1 rxd1 rxd0 logic logic data and control flow fifo shift register ncts0/ndsr0/ndcd0/nri0 control interrupt control txd 0 ncts1/ndsr1/ndcd1/nri1 receive tr an smi t logic intrrupt a[7:0] reset ncs_nuart, nopt ua rt 4 ntxrdy 0/nrxrdy 0 xta l 1 flow global logic modem control ua rt 3 logic nrts0/ndtr0 nior/niow
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 8 5. pin configuration 5.1 pin configuration for 128-pin tqfp (20x20) package figure 2: 128-pin tqfp (20x20) pin configuration dtr2n vcc cts2n rts2n xout xin_osc gnd rts3n txd3 dsr1n dcd3n rxrdy3n_rxen3 cts1n odasy1 rxrdy1n_rxen1 dcd0n rxd0 dsr2n txd0 rts0n dtr0n rxrdy0n_rxen0 vcc txrdy1n_txen1 dtr1n rts1n odasy0 cts0n txd1 clksel ri0n gnd 54 14 45 46 1 53 34 57 96 44 74 47 24 39 76 93 88 5 73 56 82 sb16c1058-tqfp128 12 128 80 18 25 33 19 91 8 95 9 94 6 42 43 85 50 35 86 40 11 55 36 13 52 77 7 2 49 20 3 87 38 81 dcd7n cts7n 23 dcd6n rxrdy7n_rxen7 dsr7n txrdy7n_txen7 rxd6 txd7 ri6n ri7n rts7n rxd7 gnd dtr7n vcc addr2 iown data0 addr4 csn_uartn data5 data4 pnen2n_intf0 addr3 data6 gnd data2 data7 vcc data3 bufn iorn idasy0 int addr5 reset addr1 addr0 optn 15 addr6 pnen3n_intf1 data1 addr7 mode idasy1 dsr0n dsr4n 22 txrdy0n_txen0 rts4n ri4n vcc dtr4n dcd4n gnd ri3n rxd3 txrdy4n_txen4 rxrdy4n_rxen4 rts5n cts4n rxd4 txd5 txd4 37 90 21 92 17 89 72 51 16 10 75 83 78 48 84 79 4 41 cts6n txrdy6n_txen6 dtr6n rxrdy6n_rxen6 dsr6n 27 28 29 30 31 59 26 32 62 60 58 64 61 70 69 63 67 66 71 65 68 98 97 99 103 101 100 105 102 108 106 104 111 109 107 113 110 116 114 112 dtr3n 117 115 118 119 120 121 rxrdy2n_rxen2 123 124 122 125 dsr3n 126 127 rxd2 txrdy3n_txen3 cts3n gnd vcc gnd ri2n cts5n dcd5n txd6 txrdy5n_txen5 rxd5 rxrdy5n_rxen5 ri5n dtr5n dcd1n dsr5n rts6n rxd1 txd2 txrdy2n_txen2 dcd2n ri1n pnen0n_osc0 pnen1n_osc1
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 9 5.2 pin description table 2: pin description data bus interface name pin type description addr0 addr1 addr2 addr3 addr4 addr5 addr6 addr7 59 58 57 56 55 54 51 50 i i i i i i i i address bus lines [7:0]. address bus lines operates in two modes ? normal mode or mio mode. in the normal mode(mode=0b), a[5:0] are used and a[7:6] are not used. a[5:3] are for the selection of 8 ua rt channels and a[2:0] are for the internal registers of the selected uart channel. in the mio mode(mode=1b), a[7:0] are all used. a[7: 6] are for the selection of 4 panels. a[5:0] are same as normal mode. data0 data1 data2 data3 data4 data5 data6 data7 43 42 41 40 39 38 37 36 i/o i/o i/o i/o i/o i/o i/o i/o data bus lines [7:0]. these pins are tri-state data bus for dat a transfer to or from the controlling cpu. nior 48 i read data (active low strobe). a valid low level on nior will load the data of an internal register defined by address lines onto the uart data bus for access by an external cpu. niow 47 i write data (active low strobe). a valid low level on niow will transfer the data from external cpu to an internal register that is defined by address lines. ncs_nuart 46 i chip select (active low). this pin enables data transfers between the external cpu and the uart for the res pective channel. in mio mode, this pin?s name is nuart and it does as ncs in normal mode. nopt 45 i option select (active low). this pin used in mio mode only and enables data transfer between the external cpu and internal option registers. if you don?t use this pin in normal mode, please pull-up this pin. nbuf 44 o buffer enable (active low). this pin used in mio mode only. when IN16C1058 output data to mio bus, it can control the direction of bus transceivers. int 49 o interrupt, this pin is a global interrupt for all 8 uart channels. each internal interrupt, int0-7 are enabled when mcr[3] is set to ?1? and afr[4] is cleared to ?0? (default state). int?s asserted state is determined by afr[5]. it?s asserted state is active high when afr[5] is set to ?1?, and active low when afr[5] is cleared to ?0?. the status of the 8 interrupts are sh own on ipr(interrupt poll register). the interrupts are masked through imr(interrupt mask register) and handled.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 10 table 2: pin description? continued name pin type description ntxrdy0/txen0 ntxrdy1/txen1 ntxrdy2/txen2 ntxrdy3/txen3 ntxrdy4/txen4 ntxrdy5/txen5 ntxrdy6/txen6 ntxrdy7/txen7 72 84 100 110 122 4 16 26 o o o o o o o o transmitter ready/tx enable. these pins provide individual channel transmitter ready or transmit enable. ntxrdy0-7 are enabled when atr[1:0] is cleared to ?00? (default state). if atr[1:0] are set to ?11?, ntxrdy0-7 operate as txen0-7. ntxr dy0-7 (active low) are asserted by tx fifo/thr status for transmit channels 0-7. txen0-7?s asserted state is determined by atr[5:4]. if atr[ 4] is cleared to ?0?, the state holds the same value as atr[5]. if atr[4] is set to ?1?, it is the auto-toggling state based on atr[5]. if these pi ns are unused, leave them open. nrxrdy0/rxen0 nrxrdy1/rxen1 nrxrdy2/rxen2 nrxrdy3/rxen3 nrxrdy4/rxen4 nrxrdy5/rxen5 nrxrdy6/rxen6 nrxrdy7/rxen7 75 85 101 111 123 5 17 27 o o o o o o o o receiver ready/rx enable. these pins provide individual channel receiver ready or receive enable. nrxrdy0-7 are enabled when atr[1:0] is cleared to ?00? (default state). if at r[1:0] is set to ?11?, nrxrdy0-7 are changed to rxen0-7. nrxrdy0-7 (a ctive low) are asserted by rx fifo/rbr status for receive channels 0-7. rxen0-7?s asserted state is determined by atr[7:6]. if atr[6] is cleared to ?0?, the state holds the same value as atr[7]. if atr[6] is se t to ?1?, it is the auto-toggling state based on atr[7]. if these pins are unused, leave them open. modem and serial i/o interface name pin type description txd0 txd1 txd2 txd3 txd4 txd5 txd6 txd7 67 79 89 105 115 127 11 21 o o o o o o o o transmit data. these pins are individual transmit data output. during the local loop-back mode, the txd output pin is disabled and txd data is internally connected to the rxd input. rxd0 rxd1 rxd2 rxd3 rxd4 rxd5 rxd6 rxd7 78 88 104 114 126 8 20 30 i i i i i i i i receive data. these pins are individual receive data input. during the local loop-back mode, the rxd input pin is disabled and rxd data is internally connected to the txd output. nrts0 nrts1 nrts2 nrts3 nrts4 nrts5 nrts6 nrts7 68 80 90 106 118 128 12 22 o o o o o o o o request to send (active low). these pins indicate that the uart is ready to send data to the modem, and affe ct transmit and receive operations only when auto-rts function is enabled.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 11 table 2: pin description? continued name pin type description ncts0 ncts1 ncts2 ncts3 ncts4 ncts5 ncts6 ncts7 70 82 92 108 120 2 14 24 i i i i i i i i clear to send (active low). these pins indicate the modem is ready to accept transmitted data from the ua rt, and affect transmit and receive operations only when auto-cts function is enabled. ndtr0 ndtr1 ndtr2 ndtr3 ndtr4 ndtr5 ndtr6 ndtr7 69 81 91 107 119 1 13 23 o o o o o o o o data terminal ready (active low). these pins indicate uart is ready to transmit or receive data. ndsr0 ndsr1 ndsr2 ndsr3 ndsr4 ndsr5 ndsr6 ndsr7 71 81 93 109 121 3 15 25 i i i i i i i i data set ready (active low). these pins indicate modem is powered-on and is ready for data exchange with uart. ndcd0 ndcd1 ndcd2 ndcd3 ndcd4 ndcd5 ndcd6 ndcd7 76 86 102 112 124 6 18 28 i i i i i i i i carrier detect (active low). these pins indicate that a carrier has been detected by modem. nri0 nri1 nri2 nri3 nri4 nri5 nri6 nri7 77 87 103 113 125 7 19 29 i i i i i i i i ring indicator (active low). these pins indicate the modem has received a ringing signal from telephone line. a low to high transition on these input pins generates a modem status interrupt, if enabled.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 12 table 2: pin description? continued multiport i/o interfaces name pin type description idasy0 idasy1 34 33 i i daisy chain input [1:0]. these pins are used only in mio mode. systembase?s mio bus can be expanded up to 32 serial ports by 8 ports. the ports are managed with daisy chain in order for 8 ports? install information to be automatically recognized. these pins are the input of daisy chain. odasy0 odasy1 66 65 o o daisy chain output [1:0]. these pins are used only in mio mode. systembase?s mio bus can be expanded up to 32 serial ports by 8 ports. the ports are managed with daisy chain in order for 8 ports? install information to be automatically recogn ized. these pins are the output of daisy chain. npnen0_osc0 npnen1_osc1 63 62 i/o these pin are dual mode pins. after power is supplied to the ch ip, the pin is set to input mode for a while and receive osc[1:0] i nput. after that, the pins are set to output mode and outputs npnen[1 :0] values. the pins are only used in mio mode. in input mode, osc[1:0] values mean osc[1:0] = 00b : use 1. 8432mhz uart clock. osc[1:0] = 01b : use 3. 6864mhz uart clock. osc[1:0] = 10b : use 7. 3728mhz uart clock. osc[1:0] = 11b : use 14. 7456mhz uart clock. in output mode, npnen[1:0] values mean npnen[3:0] = 0000b : no serial port on mio bus. npnen[3:0] = 0001b : 8 serial ports used on mio bus. npnen[3:0] = 0011b : 16 serial ports used on mio bus. npnen[3:0] = 0111b : 24 serial ports used on mio bus. npnen[3:0] = 1111b : 32 serial ports used on mio bus. npnen2_intf0 npnen3_intf1 61 60 i/o these pin are dual mode pins. after power is supplied to the ch ip, the pin is set to input mode for a while and receive intf[1:0] input. after that, the pins are set to output mode and outputs npnen[3 :2] values. the pins are only used in mio mode. in input mode, osc[1:0] values mean intf[1:0] = 00b : use rs232 interface intf[1:0] = 01b : use rs 422 interface intf[1:0] = 10b : use rs 485 interface intf[1:0] = 11b : use unknown interface in output mode, npnen[1:0] values mean npnen[3:0] = 0000b : no serial port on mio bus. npnen[3:0] = 0001b : 8 serial ports used on mio bus. npnen[3:0] = 0011b : 16 serial ports used on mio bus. npnen[3:0] = 0111b : 24 serial ports used on mio bus. npnen[3:0] = 1111b : 32 serial ports used on mio bus.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 13 table 2: pin description? continued multiport i/o interfaces name pin type description mode 64 i uart mode input mode = 0b : normal uart mode mode = 1b : mio uart mode other interfaces name pin type description xin_osc 97 i crystal or external clock input. xout 98 o crystal or buffered clock output. clksel 94 i clock select. this pin selects t he divide-by-1 or divide-by-4 prescalable clock. during the reset, the high on clksel selects the divide-by-1 prescaler. the low on clk selects the divide-by-4 prescaler. the inverting value of clksel is latched into m cr[7] at the tra iling edge of reset. reset 35 i reset (active high). this pin will reset the internal registers and all the outputs. vcc 9 31 52 73 95 116 i power supply input. 3.3v (2.7v ~ 3.6v) gnd 10 32 53 74 96 99 117 i signal and power ground.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 14 6. functional description IN16C1058 uart supports normal mode in which the chip operates as other common octal-uarts and mio mode which supports sy stembase?s mio mode. the mode can be selected by mode input. furthermore, the uart supports 256-byte fifo which enhances system performance and prevents overrun errors in multiple serial communication system. when fifo is enabled, it has a register configuration compatible with 64-byte fifo and 16c654, so it becomes compatible with 16c654. if you enable 256-byte fifo, you use the unique supreme f unction that IN16C1058 offers. it offers communication speed up to 5.3mbps and more enhanced functions that other uarts with 128-byte fifo do not. IN16C1058 can select hardware/software flow co ntrol. hardware flow control significantly reduces software overhead and increases system efficiency by automatically controlling serial data flow using the nrts output and nc ts input signals. software flow control automatically controls data flow by using programmable xon/xoff characters. in addition, IN16C1058 has to control communication bus in rs422/485 communication in order to have a stable data communication. by automatically controlling this on hardware level , IN16C1058 allows users to use the chip more easily. 6.1 normal mode and mio mode IN16C1058 can be configured as normal mode or mio mode depending on the mode input. in a normal application, the device operates in normal mode with mode = 0b and operates in mio mode with mode = 1b. when IN16C1058 is operating in normal mode, only addr[5:0], data[7:0], nior, niow and ncs signals are used. the internal options registers structure, controls pins for mio bus cannot be used and only internal uart registers are accessible. in normal mode, the device operates just as other octal-uarts that can be found elsewhere. some pins are not used in this mode and the pins are listed below in ?table 3: pin usage between normal mode and mio mode?. mio mode is a structure designed by systembase in which uart region and option region can be accessed through mio(multiport i/o) bus and i/o bus. refer to table ?table 3? to see its usage. each channel?s internal registers for octal-uart can be accessed through uart region. systembase has designed option registers to control serial communication and this can be accessed through option region. with the use of mio bus structure and option registers, up to 32 ports can be expanded by 8 ports.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 15 table 3: pin usage between normal mode and mio mode pin name normal mode mio mode description addr0 addr0 addr0 normal mode (ncs) addr[2:0] : uart registers selection addr[5:3] : 8 uarts selection mio mode (nuart) addr[5:0] : same as the normal mode addr[7:6] : 4 panels selection mio mode (nopt) addr[5:0] : option registers selection addr1 addr1 addr1 addr2 addr2 addr2 addr3 addr3 addr3 addr4 addr4 addr4 addr5 addr5 addr5 addr6 not used addr6 addr7 not used addr7 data[7:0] data[7:0] data[7:0] nior nior nior niow niow niow ncs_nuart ncs nuart nopt not used nopt option register access enable nbuf not used nbuf mio bus read enable for 245 buffer idasy[1:0] not used idasy[1:0] input daisy chain for 8-port unit block odasy[1:0] not used odasy[1:0] output dais y chain for 8-port unit block npnen0_osc0 not used npnen0_osc0 input @ initial time : osc[1:0], intf[1:0] output @ normal : npnen[3:0] npnen1_osc1 not used npnen1_osc1 npnen2_intf0 not used npnen2_intf0 npnen3_intf1 not used npnen3_intf1 6.2 mio mode IN16C1058 operates in mio mode with mode = 1b. IN16C1058 contains built-in control logics that allow expansion of up to 32 ports (by 8 ports) by adding mio bus interface and option registers structure on a common octal- uart. through this method, glue-logics are unnecessary when expanding ports. with systembase?s pci bridge controller sb 4002a, 8, 16, 24 and 32 port serial communication pci card adapter application can be made easily with low cost. in mio mode, addr[7:0] 8-bits are used. a ddr[7:6] are used to select one of 4 octal uarts, addr[5:3] are used to select one of the 8 uart channel s and addr[2:0] are used to select uart channel?s internal regi sters. to manage the install information of octal uarts that are managed by 8 ports on mio bus, daisy chain is used and the connections are idasy[1:0] and odasy[ 1:0]. npnen0_osc0, npnen_osc1, npnen_intf0 and npnen_intf1 are used fo r management of oscillator and interface
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 16 configuration and panels. 16-port serial card and expandable 32-port seri al card can be made. 16-port serial card is designed to expand 16 serial ports with two IN16C1058 octal-uarts connected to sb4002a by mio bus as shown in below diagram. 32-port serial card is designed as shown in below diagram. it is composed of one sb4002a and is capable of expanding by 8 ports using 8-port panels. when serial communication port is expanded ov er 8 ports, there is higher chance of the fifo buffer getting full in the uart as the result of pci bus? performance problem and as data is overwritten, overrun errors are more likely to occur. since IN16C1058 uses 256-byte fifo, overrun errors and the loss of data can be prev ented. therefore, IN16C1058 can be considered the optimum solution for serial cards with multiple ports. <16-port serial multiport pci card application> figure 3: expandable 32-port seri al multiport pci card application
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 17 6.3 fifo operation IN16C1058?s fifo has two modes, 64-byte fifo mode and 256-byte fifo mode. setting fcr[0] to ?1? enables fifo, a nd if afr[0] is set to ?0?, it operates in 64-byte fifo mode(default). in this mode, transmit data fifo, receive data and receive status fifo are 64 bytes. 64-byte fifo mode allows you to select the transmit interrupt trigger level from 8, 16, 32, or 56. you can verify this in terrupt trigger level by ttr and rtr. in this mode ttr and rtr are read only. and by fcr[5:4], xoff trigger level can be se lected to either 8, 16, 56, or 60, and xon trigger level to either 0, 8, 16, or 56 by fcr[7:6]. you can verify xon and xoff trigger level by fur and flr. in 64-byte fifo mode ttr and rtr are read only. if you select 256-byte fifo mode, you c an experience more powerful features of IN16C1058. setting both fcr[0] and afr[0] to ?1 ? will enable this mode. in this mode, transmit data fifo, receive data and receive status fifo are 256 bytes. interrupt trigger level and xon, xoff trigger level are controlled by ttr, rtr, fur and flr, not by fcr[7:4]. that is, ttr, rtr, f ur and flr can both read and write. you can verify free space of transmit fifo and the nu mber of characters received in receive fifo by tcr, rcr and isr[7:6]. while tx fifo is full, the value sent to t hr by cpu disappears. and while rx fifo is full, the data coming from external devices di sappear as well, provided that flow control function is not used. for more information, refer to register description. 6.4 hardware flow control hardware flow control is executed by auto-rts and auto-cts. auto-rts and auto-cts can be enabled/disabled independently by programming efr[7:6]. if auto-rts is enabled, it reports that it cannot receive mo re data by asserting nrts when the amount of received data in rx fifo exceeds the wri tten value in fur. then after the data stored in rx fifo is read by cpu, it reports that it can receive new data by deasseting nrts when the amount of existing data in rx fi fo is less than the written value in flr. when auto-cts is enabled and ncts is cleared to ?0?, transmitting data to tx fifo has to be suspended because external device has r eported that it cannot accept more data. when data transmission has been suspended and ncts is set to ?1?, data in tx fifo is retransmitted because external device has repor ted that it can accept more data. these operations prevent overrun during communication and if hardware flow control is disabled and transmit data rate exceeds rx fifo service latency, overrun error occurs. 6.4.1 auto-rts to enable auto-rts, efr[6] should be set to ?1?. once enabled, nrts outputs ?0?. if the number of received data in rx fifo is larger than the value stored in fur, nrts will be changed to ?1? and if not, holds ?0?. this stat e indicates that rx fifo can accept more data. after nrts changed to ?1? and reported to the cpu that it cannot accept more data, the cpu reads the data in rx fifo and then the amount of data in rx fifo reduces. when the amount of data in rx fifo equals t he value written in flr, nrts changes to ?0? and reports that it can accept more data. that is, if nrts is ?0? now, nrts is not
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 18 changed to ?1? until the amount in rx fifo exceeds the value set in fur. but if nrts is ?1? now, nrts is not changed to ?0? until t he amount in rx fifo equals the value written in flr. the value of fur and flr is determined by fi fo mode. if fcr[7:6] holds ?00?, ?01?, ?10?, and ?11?, fur stores 8, 16, 56, and 60, respective ly. and if fcr[5:4] holds ?00?, ?01?, ?10?, and ?11?, flr stores 0, 8, 16, and 56, respectively in 64-byte fifo. in 256-byte fifo mode, users can write fur and flr values as they want and use them. but the value of fur must be larger than that of flr. while auto-rts is enabled, you can verify if nrts is ?0? or ?1? by fsr[5]. if fsr[5] is ?0?, nr ts is ?0? and if ?1?, nrts is ?1?, too. when ier[6] is set to ?1? and nrts is changed from ?0? to ?1? by auto-rts function, interrupt occurs and it is displayed on is r[5:0]. interrupts by auto-rts function are removed if msr is read. nrts is changed from ?0? to ?1? after the first stop bit is received. figure 4 shows the nrts timing chart while auto-rts is enabled. in figure 4, data byte n-1 is received and nrts is deasserted when the amount of data in rx fifo is larger than the value wri tten in fur. uart completes transmitting new data (data byte n) which has started being transmitted even though external uart recognizes nrts has been deasserted. after that, the device stops transmitting more data. if cpu reads data of rx fifo, the valu e of rcr decreases and then if that value equals that of flr, nrts is asserted for external uart to transmit new data. figure 4: nrts functional timing 6.4.2 auto-cts setting efr[7] to ?1? enables auto-rts. if enabled, data in tx fifo are determined to be transmitted or suspended by the value of nc ts. if ?0?, it means external uart can receive new data and data in tx fifo are transmitted through txd pin. if ?1?, it means external uart can not accept more data a nd data in tx fifo are not transmitted. but data being transmitted by then complete transmission. these procedures are performed irrespective of fifo modes. while auto-cts is enabled, you can verify the input value of ncts by fsr[1]. if ?0?, ncts is ?0? and it means external uart can accept new data, if ?1?, ncts is ?1? and it means external uart can not accept more data and data in tx fifo are not being transmitted. if ier[7] is se t to ?1?, interrupt is generated by auto-cts when the input of ncts is changed from ?0? to ?1?, and it is shown on isr[5:0]. interrupts start nior da ta by te n- 1 stop sta rt da ta by te n stop data byte 1 data byte 2 da ta by te n start fur + 0 fur - 0 fur + 1 fur - 0 fur - 1 rcr[7:0] flr + 1 flr + 0 rxd nrts
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 19 generated by auto-cts are removed if msr is read. 6.5 software flow control software flow control is performed by xon and xoff character transmitting/accepting. software flow control is enabled/disabled independently by programming efr[3:0] and mcr[6:5, 2]. if tx software flow contro l is enabled by efr[3:2], xoff character is transmitted to report that dat a can not be accepted when t he stored amount of data in rx fifo exceeds the value in fur. after t he cpu reads the data in rx fifo and if the read amount is less than the value in flr, xon character is transmitted to report that more data can be accepted. if tx software flow control is enabled by efr[1:0] and xoff character is inputted through rxd pin, it means no more data can be accepted, and data transmission is suspended even though data are in tx fifo. if xon character is received through rxd pin while data transmission is suspended, it means more data can be accepted, and therefore data in tx fi fo are re-transmitted. these procedures prevent overruns during communication. if software flow control is disabled, overrun occurs when the transmit data rate exceeds rx fifo service latency. different combinations of software flow control can be enabled by setting different combinations of efr[3:0] . table 3 shows software flow control options. table 4: software flow control options (efr[3:0]) efr[3] efr[2] efr[1] efr[0] tx, rx software flow controls 0 0 x x no transmit control 1 0 x x transmit xon1/xoff1 0 1 x x transmit xon2/xoff2 1 1 x x transmit xon1, xon2/xoff1, xoff2 x x 0 0 no receive flow control x x 1 0 receiver compares xon1/xoff1 x x 0 1 receiver compares xon2/xoff2 x x 1 1 receiver compares xon1, xon2/xoff1, xoff2 0 0 0 0 no transmit control, no receive flow control 0 0 1 0 no transmit control, receiver compares xon1/xoff1 0 0 0 1 no transmit control, receiver compares xon2/xoff2 0 0 1 1 no transmit control, receiver compares xon1, xon2/xoff1, xoff2 1 0 0 0 transmit xon1/xoff1, no receive flow control 1 0 1 0 transmit xon1/xoff1, receiver compares xon1/xoff1 1 0 0 1 transmit xon1/xoff1, receiver compares xon2/xoff2 1 0 1 1 transmit xon1/xoff1, receiver compares xon1, xon2/xoff1, xoff2 0 1 0 0 transmit xon2/xoff2, no receive flow control 0 1 1 0 transmit xon2/xoff2, receiver compares xon1/xoff1 0 1 0 1 transmit xon2/xoff2, receiver compares xon2/xoff2 0 1 1 1 transmit xon2/xoff2, receiver compares xon1, xon2/xoff1, xoff2 1 1 0 0 transmit xon2/xoff2, no receive flow control 1 1 1 0 transmit xon2/xoff2, xoff2, receiver compares xon1/xoff1 1 1 0 1 transmit xon1, xon2/xoff1, xoff2, receiver compares xon2/xoff2 1 1 1 1 transmit xon1, xon2/xoff1, xoff2, re ceiver compares xon1, xon2/xoff1, xoff2
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 20 6.5.1 transmit software flow control to make transmit software flow control enabled, efr[3:2] must be set to ?01?, ?10? or ?11?. unlike auto-rts in which ?0? is outputted on nrts when tx software flow control function is enabled, xon character is not tran smitted at first. if the amount of data in rx fifo (written in isr[6] and rcr) is less than the value in fur, xon character is not transmitted because xon is in in itial state. but if the amount of data in rx fifo exceeds the value in fur, xoff character is transmi tted immediately. transmitting xoff character means no more data can be accepted and after cpu reads data in rx fifo, data in rx fifo decreases. when the amount of data in rx fifo is same as the value of flr, xon character is transmitted and it means reporting to external uart that it can accept more data. after transmitting xoff character, xon c haracter is not transmi tted until the amount of data in rx fifo is same as the value of flr. the value of flr is determined by fifo mode. if fcr[7:6] is ?00?, ?01?, ?10?, and ?11?, fur is 8, 16, 56, and 60, respectively. and if f cr[5:4] is ?00?, ?01?, ?10?, and ?11?, flr is 0, 8, 16, and 56, respectively in 64-byte fifo. in 256-byte fifo mode, users can input values in fur and flr as they want and use them. but the value in fur must be larger than that of flr. while tx software flow contro l is active, its status (if xon or xoff) can be verified by fsr[4]. if fsr[4] is ?0?, the status is xon and if ?1?, the status is xoff. it can be verified by fsr[4] only. and for there is no condition to generate interrupt, interrupt doesn?t occur. it is different from that interr upt is generated by ier[5] when rx software flow control is enabled. 6.5.2 receive software flow control to make receive software flow control enabl ed, efr[1:0] must be set to ?01?, ?10? or ?11?. when enabled, data in tx fifo are determined to be transmitted or suspended by incoming xon/xoff characters. if xon characte r is received, it means external uart can accept new data, and data in tx fifo are transmitted through txd pin. if xoff character is received, it means external uart can not accept more data, and data in tx fifo are not transmitted. but data being transmitted by t hat time are completely transmitted. these procedures are performed irrespective of fifo modes. while receive software flow control is enabled, you can verify if the rx so ftware flow control status is xon or xoff by fsr[0]. if it is ?0?, rx software flow control status is xon and it means external uart can accept new data. if ?1?, rx softwa re flow control status is xoff and it means external uart can not accept more data and data in tx fifo are not being transmitted. if ier[5] is set to ?1?, interrupt is generated when xoff character is received and it is shown on isr[5:0]. interrupts generated by rx software flow control are removed if isr is read or xon character is received. general problems in using xo n/xoff function and tips for us ing xon/xoff character as one character are as follows. when rx software flow control and auto-cts are enabled, lsr?s transmit empty bit and transmit holding empty bit are not affected even though rx flow control status is xoff or ?1? is inputted on ncts pin, so data in tx fifo are suspended. that is, these two bits are set to ?1? if there is space available in tx fifo. xon/xoff character which generated parity error are treated as normal xon/xoff
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 21 character. if xon and xoff character are set to sa me, both characters are treated as xon character. tips for using xon/xoff character as two characters are as follows. if received characters are xon1, xon1 and xon2, rx flow control status becomes xon and previous xon1 is ignored. if received characters are xoff1, xoff1 and xoff2, rx flow control status becomes xoff and previous xoff1 is ignored. if received characters are repeated as xon1 xo ff1, xon1 and xoff1, there is no effect in rx flow control status and these characte rs are not treated as data. but if received characters are xon1 xoff1, xon1, xoff1, xon1 and xon2, rx flow control status becomes xon. if received characters are xon1 xoff1, xon1, xoff1 and xoff2, rx flow control status becomes xoff. if xon1 and xoff1 characters do not prec ede xon2 and xoff2, xon2 and xoff2 are treated as data and stored in rx fifo. if xon1 is not accompanied with xon2 or xo ff1 character, it is treated as data and stored in rx fifo. if xoff1 is not accompanied with xoff2 or xon1 character, it is treated as data and stored in rx fifo. as seen before, if received c haracters are xon1, xoff2, x on2 or xoff1, xon2, xoff2, these characters are all treated as data and stored in rx fifo. if characters are arrived continuously like xon1, xon2 or xoff1, xoff2, descriptions are as follows. if xon1, xon2 characters and xoff1, xoff2 c haracters are same with each other, all characters are treated as norm al xon and xoff characters. if xon1, xoff1 characters and xon2, xoff2 characters are same with each other, these are treated as normal xon characters. if xon1, xon2, xoff1 characters are same an d xoff2 is different, these are treated as normal xon, xoff characters. if xon1, xon2, xoff2 characters are same an d xoff1 is different, these are treated as normal xon, xoff characters. if xon2, xoff1, xoff2 characters are same and xon1 is different, these are treated as normal xon, xoff characters. if xon1, xoff1, xoff2 characters are same and xon2 is different, these are treated as normal xon, xoff characters. if xon2, xoff1 characters are same and xon1, xoff2 are different, these are treated as normal xon, xoff characters. if xon1, xon2, xoff1, xoff2 are all sa me, these are treated only as normal xon characters. in all these cases no xon/xoff c haracters are treated as data. refer to table 5 below.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 22 table 5: xon/xoff character recognition logic table xon1 char. xon2 char. xoff1 char. xoff2 char. recognition of xon char. recognition of xoff char. 11h 11h 13h 13h yes yes 11h 13h 11h 13h yes no 11h 11h 11h 13h yes yes 11h 11h 13h 11h yes yes 11h 13h 13h 13h yes yes 11h 13h 11h 11h yes yes 11h 13h 13h 14h yes yes 11h 11h 11h 11h yes no in case xon/xoff software flow control function and xon any function is enabled, descriptions are as follows. if xon, xoff characters are used as one character, if xoff character arrives during xon status, status changes to xoff. if xon character arrives during xoff status, status changes to xon. if xoff character arrives during xoff st atus, status changes to xon but xoff character is not treated as data. if xon, xoff characters are used as two characters, if only xon1 or xon1 + xon2 character arrives during xoff status, status changes to xon and all characters are not treated as data. if only xon2 character arrives during xoff status, status changes to xon and xon2 character is treated as data and stored in rx fifo. if xoff1 + xoff2 character arrives during xon status, status changes to xon. if xoff1 + xoff2 character arrives during xo ff status, status is changed to xon by xoff1 and changed to xoff again by xoff2. in case software flow control function and special character function is enabled, descriptions are as follows. if xoff1 character is used as software flow control character, character in xoff2 register is recognized as special character. if xoff2 character is used as software flow control character, it is not recognized as special character but as xoff character because both are same. if xoff1, xoff2 character is sequential and xoff1 + xoff2 character is used as software flow control character, it is not recognized as special character but as xoff2 character because both are same. if xoff1 + xoff2 character is used as software flow control character and xoff2 character which does not follow after xoff1 character arrives, it is not recognized as xoff2 character but as special c haracter even though both are same.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 23 6.5.3 xon any function while rx software flow control function is enabled, data in tx fifo are transmitted when received xon character and transmission is su spended when xoff character is received. this status is called ?xoff status?. transmission is re-sta rted when status changes to ?xon status? by incoming xon character or xon any function that changes status when any data arrives. xon any function is enabled if mcr[5] is set to ?1?. while it is enabled, xoff status changes to xon status though xoff character arrives. details about it are described in 6.3. 2 receive software flow control. 6.5.4 xoff re-transmit function while tx software flow control function is active, xoff character is transmitted when the amount of data in rx fifo exceeds the valu e of fur. though it received xoff character, external uart may not recognize this charac ter for some reason and continue to transmit data. under tx software flow control, bec ause xoff character had been transmitted once before, it is not trans mitted again though more data arrive. in this situation, overflow may occur in rx fifo. conventional uarts can not deal this situation but IN16C1058 does with xoff re-transmit function. xoff re-transmit function transmits xoff character again when more data arrives from external uart though it transmitted xoff char acter before. by this function the external uart can recognize xoff character and stop transmitting data though it didn?t recognize the xoff character before. there are four xoff re-transmitting settings by xrcr[1:0]. xoff character can be re- transmitted when every 1, 4, 8 or 16 data arrives in xoff status. if xrcr[1:0] is ?00?, xoff character is re -transmitted whenever 1 more data arrives in xoff status. if xrcr[1:0] is ?01?, xoff character is re-transmitted whenever 4 more data arrives in xoff status. if ?10?, 8 more data and if ?11?, 16 more data. if the value of fur is approaching the fifo size, 256-byte, it is good to write xrcr[1:0] ?00?. if the 256-fur value is small, it is good to select ?00? of xrcr and if large, it is good to select ?11?. xoff re-transmit function is enabled by mcr[6] and mcr[2]. c hange mcr[2] from op1# function to xoff re-transmit function by setting mcr[6] to ?1? and set mcr[2] to ?1? again. then xoff re-transmit function is enabled. when disabling it, first set mcr[6] to ?1? and then clear mcr[2] to ?0?.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 24 6.6 interrupts as there are eight independent channel uarts in IN16C1058, so there are eight internal interrupts. interrupts are assigned internal in terrupts: int0, int1, int2, int3, int4, int5, int6 and int7 for each channel. each interrupt has six prioritized level?s interrupt generation capability. the ier enables each of the six types of interrupts and int signal in response to an interrupt generation. when an interrupt is generated, the isr indicates that an interrupt is pending and provides the type of interrupt. and IN16C1058 can handle for eight interrupts with one global interrupt. global interrupt treats eight of each interrupt as one interrupt, so it is useful when external system has few interrupt resource. gicr determines whether global interrupt occurs or no t. while gicr[x] is set to ?1?, an interrupt that is generated in one of eight channel ua rts and treated as unmask is transmitted to gint. but if gicr[x] is cleared to ?0?, an interrupt is not transmitted to gint though interrupts are generated in one of eight ch annel uarts and treated as mask. so this interrupt is not transmitted to external cpu. gisr is the status of each channel uart. it just show the status of eight channels whether interrupt is gen erated or not. if gisr[0] is cleared to ?0?, it means that interrupt is not generated in the uart and if set to ?1?, it means that interrupt is gener ated. the value of gisr[0] sh ows the status of interrupt generated in the uart. each internal interrupt is decided by the valu e of ?gicr x gisr?. in other words, when the both of them have logic ?1?, internal interrupt of the channel is generated. and the global interrupt is decided by logic and for each internal interrupt. if one of eight internal interrupt is generated, the gl obal interrupt is generated.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 25 6.7 dma operation transmitter and receiver dma operation is available through ntxrdy, nrxrdy, ntxrdy[7:0], and nrxrdy[7:0]. there are two modes of dma operation, dma mode 0 or dma mode 1, selected by fcr[3]. in dma mode 0 or fifo disable (fcr[3] = 0), dm a occurs in single character transfer. in dma mode 1, multi-character dma transfers are managed to relieve the cpu for longer periods of time. 6.7.1 single dma transfer (d ma mode 0/fifo disable) transmitter: there are no character in tx fi fo or thr. and the ntxrdy[7:0] signals will be in assert state. ntxrdy[7:0] will switch to deassert state after one character is loaded into tx fifo or thr. receiver: there is at least one character in rx fifo or rhr. and the nrxrdy[7:0] signals will be in assert state. once nrxrdy is asserted, nrxrdy[7:0] signal will switch to deassert state when there are no more characters in rx fifo or rbr. figure 5 shows ntxrdy, ntxrdy[7:0], nr xrdy, and nrxrdy[7:0] in dma mode 0/fifo disable. figure 5: ntxrdy/ntxrdy[7:0] and nrxrdy/n rxrdy[7:0] in dma mode 0/fifo disable. tcr 01h tx fifo character #1 tcr 00h tx fifo empty ntxrdy,n txrdy[7:0] ntxrdy,n txrdy[7:0] at least one location filled rx fifo empty rcr rcr 00h rx fifo character #1 01h nrxrdy,n rxrdy[7:0] nrxrdy,n rxrdy[7:0] at least one location filled empty space empty space is r[7 ] 0 1 is r[7 ] 0 is r[6 ] 0 is r[6 ]
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 26 6.7.2 block dma transfer (dma mode 1) transmitter: when the characters in tx fifo ar e less than the trigger level that is set in ttr, ntxrdy or ntxrdy[7:0] signal is asse rted. when tx fifo is full, ntxrdy or ntxrdy[7:0] signal is deasserted. receiver: when the characters in rx fifo ar e more than the trigger level that is set in rtr, nrxrdy or nrxrdy[7:0] signal is asse rted. when rx fifo is empty, rxrdy or rxrdy[7:0] signal is deasserted. the figure 6 below shows ntxrdy, ntxrdy [7:0] and nrxrdy, nrxrdy[7:0] in dma mode 1. figure 6: ntxrdy/ntxrdy[7:0] and nr xrdy/nrxrdy[7:0] in dma mode 1. 6.8 sleep mode with auto wake-up the IN16C1058 provides sleep mode operation to reduce its power consumption when sleep mode is activated. sleep mode is enable d when efr[4] and ier[4] are set to ?1?. sleep mode is activated when: rxd input is in idle state. ncts, ndsr, ndcd, and nri are not toggling. the tx fifo and tsr are in empty state. no interrupt is pending except thr and time-out interrupts. in sleep mode, the IN16C1058 clock and baud rate clock are stopped. since most registers are clocked using these clocks, the power consumption is greatly reduced. normal operation is resumed when: tcr tcr is r[6 ] 80h nrxrdy,n rxrdy[7:0] rcr 0 tx fifo 80h is r[7] 0 00h character #1 ntxrdy,n txrdy[7:0] is r[6 ] 0 is r[7] rcr 0 rx fifo empty ntxrdy,n txrdy[7:0] nrxrdy,n rxrdy[7:0] 00h tx fifo full rx fifo character #1 ttr 80h character #2 character #256 character #255 character #128 character #127 character #2 character #1 character #127 empty space character #128 ttr 80h rtr 80h 80h rtr character #2 empty space character #127 character #128
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 27 rxd input receives the data start bit transition. data byte is loaded to the tx fifo or thr. ncts, ndsr, ndcd, and nri inputs are changed. 6.9 programmable baud rate generator the IN16C1058 has a programmable baud rate generator with a prescaler. the prescaler is controlled by mcr[7], as shown in figure 7. the mcr[7] sets the prescaler to divide the clock frequency by 1 or 4. and the baud rate generator further divides this clock frequency by a programmable divisor (dll and dlm) between 1 and (2 16 ? 1) to obtain a 16x sampling rate clock of the serial data rate. the sampling rate clock is used by transmitter for data bit shifting and receiver for data sampling. the divisor of the baud rate generator is: divisor = ( xtal1 crystal input frequency ) prescaler (desired baud rate x 16) mcr[7] is cleared to ?0? (prescaler = 1), when clksel input is in high state after reset. mcr[7] is set to ?1? (prescaler = 4), when clksel input is in low state after reset. figure 7: prescaler and baud rate generator block diagram dll and dlm must be written to in order to program the baud rate. dll and dlm are the least and most significant byte of the baud rate divisor, respectively. if dll and dlm are both zero, the IN16C1058 is effectively dis abled, as no baud clock will be generated. table 6 shows the baud rate and divisor value for prescaler with divide by 1 as well as crystal with frequency 1.8432mhz, 3. 6864mhz, 7.3728mhz, and 14.7456mhz, respectively. figure 8 shows the crystal clock circuit reference. progammable clock oscillator logic logic divisor (divide by 4) mcr[7] = 0 baud rate xtal2 reference logic internal (divide by 1) logic internal baud rate clock for transmitte r and receiver prescaler xtal1 mcr[7] = 1 prescaler generator
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 28 table 6: baud rates desired baud rate 16x digit divisor for prescaler with divide by 1 1.8432mhz 3.6864mhz 7.3728mhz 14.7456mhz 50 0900h 1200h 2400h 4800h 75 0600h 0c00h 1800h 3000h 150 0300h 0600h 0c00h 1800h 300 0180h 0300h 0600h 0c00h 600 00c0h 0180h 0300h 0600h 1200 0060h 00c0h 0180h 0300h 1800 0040h 0080h 0100h 0200h 2000 003ah 0074h 00e8h 01d0h 2400 0030h 0060h 00c0h 0180h 3600 0020h 0040h 0080h 0100h 4800 0018h 0030h 0060h 00c0h 7200 0010h 0020h 0040h 0080h 9600 000ch 0018h 0030h 0060h 19.2k 0006h 000ch 0018h 0030h 38.4k 0003h 0006h 000ch 0018h 57.6k 0002h 0004h 0008h 0010h 115.2k 0001h 0002h 0004h 0008h 230.4k D 0001h 0002h 0004h 460.8k D D 0001h 0002h 921.6k D D D 0001h figure 8: crystal clock circuit diagram table 7: component values frequency range (mhz) c1 (pf) c2 (pf) r1 ( ? ) r2( ? ) 1.8~8 22 68 220k 470 ~ 1.5k 8~16 33~68 33 ~ 68 220k ~ 2.2m 470 ~ 1.5k xta l 2 xta l 1 sb16c1058 sb16c1058 xta l 2 xta l 1 clock clock output external optional r2 c1 c2 r1 crystal
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 29 6.9 break and time-out conditions break condition: break condition is occurred when txd signal outputs ?0? and sustains for more than one character. it is occurred if lcr[6] is set to ?1? and dele ted if ?0?. if break condition is occurred when normal data are transmitted on txd, break sign al is transmitted and internal serial data are also transmitted, but they are not outputted to external txd pin. when break condition is deleted, then they are transmitted to txd pin. figure 9 below shows the break condition block diagram. time-out condition: when serial data is received from external uart, characters are stored in rx fifo. when the number of characters in rx fifo reaches the trigger level, interrupt is generated for the cpu to treat characters in rx fifo. but when the number of characters in rx fifo does not reach the trigger level and no more data arrives from external device, interrupt is not generated and therefore cpu cannot recognize it. IN16C1058 offers time-out function for this situation. time-out f unction generates an interrupt and reports to cpu when the number of rx fifo is less than trigger level and no more data receives for four character time. time-out interrupt is enabled when ier[2] is set to ?1? and can be verified by isr. figure 9: break condition block diagram m character #1 r mcr[6] = 0 mcr[6] = 1 s r r mcr[6] = 1 transmitter shift register(tsr) r s tx fifo txd pin s mcr[6] = 0 character #2 tsr out put r mcr[6] = 0 brake condition output s l l s s m m r l 16x clock
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 30 7. uart register descriptions each uart channel in the IN16C1058 has its own set of registers selected by address lines a2, a1, and a0 with a specific channel selected. the complete register set is shown on table 8 and table 9. table 8: internal registers map address a[2:0] page 0 page 1 page 2 page 3 page 4 lcr[7] = 0 mcr[6] = 0 lcr[7] = 1 lcr[7:0] bfh lcr[7] = 0 mcr[6] = 1 lcr = bfh psr[0] = 0 lcr = bfh psr[0] = 1 0h thr/rbr dll psr psr 1h ier dlm gicr atr afr 2h fcr/isr gisr efr xrcr 3h lcr 4h mcr xon1 ttr 5h lsr tcr xon2 rtr 6h msr rcr xoff1 fur 7h spr fsr xoff2 flr
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 31 table 9: internal registers map? continued address a[2:0] register read/write comments page 0 registers 0h thr : transmit holding register rbr : receive buffer register write-only read-only lcr[7] = 0, mcr[6] = 0 1h ier : interrupt enable register read/write lcr[7] = 0, mcr[6] = 0 2h fcr : fifo control register isr : interrupt status register write-only read-only lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh 3h lcr : line control register read/write 4h mcr : modem control register read /write lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh, lcr[7] = 0, mcr[6] = 1 5h lsr : line status register read -only lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh 6h msr : modem status register re ad-only lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh 7h spr : scratch pad register read /write lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh page 1 registers 0h dll : divisor latch lsb read/write lcr[7] = 1, lcr bfh 1h dlm : divisor latch msb read/write lcr[7] = 1, lcr bfh 2h fcr : fifo control register isr : interrupt status register write-only read-only lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh 3h lcr : line control register read/write 4h mcr : modem control register read /write lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh, lcr[7] = 0, mcr[6] = 1 5h lsr : line status register read -only lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh 6h msr : modem status register re ad-only lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh 7h spr : scratch pad register read /write lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 32 table 9: internal registers map? continued address a[2:0] register read/write comments page 2 registers 0h none 1h gicr : global interrupt control regist er write-only lcr[7] = 0, mcr[6] = 1 2h gisr : global interrupt status regist er read-only lcr[7] = 0, mcr[6] = 1 3h lcr : line control register read/write 4h mcr : modem control register read /write lcr[7] = 0, mcr[6] = 0, lcr[7] = 1, lcr bfh, lcr[7] = 0, mcr[6] = 1 5h tcr : transmit fifo count register read-only lcr[7] = 0, mcr[6] = 1 6h rcr : receive fifo count register read-only lcr[7] = 0, mcr[6] = 1 7h fsr : flow control status register read-only lcr[7] = 0, mcr[6] = 1 page 3 registers 0h psr : page select register read/write lcr = bfh, psr[0] = 0, lcr = bfh, psr[0] = 1 1h atr : auto toggle control register read/write lcr = bfh, psr[0] = 0 2h efr : enhanced feature register read/write lcr = bfh, psr[0] = 0 3h lcr : line control register read/write 4h xon1 : xon1 character register read/write lcr = bfh, psr[0] = 0 5h xon2 : xon2 character register read/write lcr = bfh, psr[0] = 0 6h xoff1 : xoff1 character register read/write lcr = bfh, psr[0] = 0 7h xoff2 : xoff2 character register read/write lcr = bfh, psr[0] = 0 page 4 registers 0h psr : page select register read/write lcr = bfh, psr[0] = 0, lcr = bfh, psr[0] = 1 1h afr : additional feature register read/write lcr = bfh, psr[0] = 1 2h xrcr : xoff re-transmit count register read/write lcr = bfh, psr[0] = 1 3h lcr : line control register read/write 4h ttr : transmit fifo trigger level register read/write lcr = bfh, psr[0] = 1 5h rtr : receive fifo trigger level register read/write lcr = bfh, psr[0] = 1 6h fur : flow control upper threshold regi ster read/write lcr = bfh, psr[0] = 1 7h flr : flow control lower threshold register read/write lcr = bfh, psr[0] = 1
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 33 table 9: internal registers description addr. a[2:0] reg. bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 page 0 registers 0h thr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0h rbr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 1h ier 0/ncts interrupt enable 0/nrts interrupt enable 0/xoff interrupt enable 0/sleep mode enable modem status interrupt enable receive line status interrupt enable thr empty interrupt enable receive data available interrupt enable 2h isr fcr[0]/ 256-tx fifo empty fcr[0]/ 256-rx fifo full interrupt priority bit 5 interrupt priority bit 4 interrupt priority bit 3 interrupt priority bit 2 interrupt priority bit 1 interrupt priority bit 0 2h fcr rx trigger level (msb) rx trigger level (lsb) 0/tx trigger level (msb) 0/tx trigger level (lsb) dma mode select tx fifo reset rx fifo reset fifo enable 3h lcr divisor enable set tx brake set parity parity type select parity enable stop bits word length bit 1 word length bit 0 4h mcr clock select page 2 select/xoff re-transmit access enable 0/xon any 0/loop back out2/ intx enable out1/ xoff re- transmit enable nrts ndtr 5h lsr rx fifo data error thr & tsr empty thr empty receive break framing error parity error overrun error receive data ready 6h msr ndcd nri ndsr ncts ? ndcd ? nri ? ndsr ? ncts 7h scr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 page 1 registers 0h dll bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 1h dlm bit 15 bit 14 bit 13 bi t 12 bit 11 bit 10 bit 9 bit 8 page 2 registers 1h gicr ch7 interrupt mask ch6 interrupt mask ch5 interrupt mask ch4 interrupt mask ch3 interrupt mask ch2 interrupt mask ch1 interrupt mask ch0 interrupt mask 2h gisr ch 7 interrupt status ch 6 interrupt status ch 5 interrupt status ch 4 interrupt status ch 3 interrupt status ch 2 interrupt status ch 1 interrupt status ch 0 interrupt status 5h tcr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 6h rcr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 7h fsr 0 0 tx hw flow control status tx sw flow control status 0 0 rx hw flow control status rx sw flow control status
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 34 table 9: internal registers description? continued addr. a[2:0] reg. bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 page 3 registers 0h psr 1 0 1 0 0 1 0 page select 1h atr rxen polarity select rxen enable txen polarity select txen enable 0 0 auto toggle mode bit 1 auto toggle mode bit 0 2h efr auto- ncts enable auto- nrts enable special character detect enable enhanced feature enable software flow control bit 3 software flow control bit 2 software flow control bit 1 software flow control bit 0 4h xon1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 5h xon2 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 6h xoff1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 7h xoff2 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 page 4 registers 1h afr 0 0 global interrupt polarity select global interrupt enable 0 0 0 256-fifo enable 2h xrcr 0 0 0 0 0 0 bit 1 bit 0 4h ttr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 5h rtr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 6h fur bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 7h flr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 7.1 transmit holding register (thr, page 0) the transmitter section consists of the tr ansmit holding register (thr) and transmit shift register (tsr). the thr is actually a 64-byte fifo or a 256-byte fifo. the thr receives data and shifts it into the tsr, where it is converted to serial data and moved out on the tx terminal. if the fifo is disabled, loca tion zero of the fifo is used to store the byte. characters are lost if overflow occurs. 7.2 receive buffer register (rbr, page 0) the receiver section consists of the receiv e buffer register (rbr) and receive shift register (rsr). the rbr is actually a 64-byte fifo or a 256-byte fifo. the rsr receives serial data from external terminal. the serial data is converted to parallel data and is transferred to the rbr. this receiver section is controlled by the line control register. if the fifo is disabled, location zero of the fifo is used to store the characters. if overflow occurs, characters are lost. t he rbr also stores the error status bits associated with each character.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 35 7.3 interrupt enable register (ier, page 0) ier enables each of the seven types of interrupt, namely receive data ready, transmit empty, line status, modem status, xoff receiv ed, nrts state transition from low to high, and ncts state transition from low to high. all interrupts are disabled if bit[7:0] are cleared. interrupt is enabled by setting appropriate bits. table 10 shows ier bit settings. table 10: interrupt enable register description bit symbol description 7 ier[7] ncts interrupt enable (requires efr[4] = 1). 0 : disable the ncts interrupt (default). 1 : enable the ncts interrupt. 6 ier[6] nrts interrupt enable (requires efr[4] = 1). 0 : disable the nrts interrupt (default). 1 : enable the nrts interrupt. 5 ier[5] xoff interrupt enable (requires efr[4] = 1). 0 : disable the xoff interrupt (default). 1 : enable the xoff interrupt. 4 ier[4] sleep mode enable (requires efr[4] = 1). 0 : disable sleep mode (default). 1 : enable sleep mode. 3 ier[3] modem status interrupt enable 0 : disable the modem status register interrupt (default). 1: enable the modem status register interrupt. 2 ier[2] receive line status interrupt enable 0 : disable the receive line status interrupt (default). 1: enable the receive line status interrupt. 1 ier[1] transmit holding register interrupt enable 0 : disable the thr interrupt (default). 1 : enable the thr interrupt. 0 ier[0] receive buffer register interrupt enable 0 : disable the rbr interrupt (default). 1 : enable the rbr interrupt.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 36 7.4 interrupt status register (isr, page 0) the uart provides multiple levels of prioritized interrupts to minimize software work load. isr provides the source of interrupt in a prioritized manner. table 11 shows isr[7:0] bit settings. table 11: interrupt status register description bit symbol description 7 isr[7] fcr[0]/256 tx fifo empty. when 256-byte fifo mode is disabled (default). mirror the content of fcr[0]. when 256-byte fifo mode is enabled. 0 : 256-byte tx fifo is full. 1 : 256-byte tx fifo is not full. when tcr is ?00h?, there are two situations of tx fifo full and tx fifo empty. if 256 tx empty bit is ?1?, it means tx fifo is empty and if ?0?, it means 256 bytes character is fully stored in tx fifo. 6 isr[6] fcr[0]/256 rx fifo full. when 256-byte fifo mode is disabled (default). mirror the content of fcr[0]. when 256-byte fifo mode is enabled. 0 : 256-byte rx fifo is not full. 1 : 256-byte rx fifo is full. when rcr is ?00h?, there are two situations of rx fifo full and rx fifo empty. if 256 rx empty bit is ?1?, it means 256 bytes character is fully stored in rx fifo and if ?0?, it means rx fifo is empty. table 11: interrupt status register description? continued bit interrupt priority li st and reset functions 5:0 priority interrupt type interrupt source interrupt reset control 00 _ 0001 D none none D 00 _ 0110 1 receiver line status oe, pe, fe, bi reading the lsr. 00 _ 0100 2 receive data available receiver data available, reaches trigger level. reading the rbr or rcr falls below trigger level. 00 _ 1100 2 character timeout indi- cation at least one data is in rx fifo and there are no more data in fifo during four character time. reading the rbr. 00 _ 0010 3 transmit holding register empty when thr is empty or tcr passes above trigger level (fifo enable). reading the isr or write data on thr. 00 _ 0000 4 modem status ncts, nds r, ndcd, nri reading the msr. 01 _ 0000 5 receive xoff or special character detection of a xoff or specia l character. reading the isr. 10 _ 0000 6 nrts, ncts status during auto rts/cts flow control nrts pin or ncts pin change state from ?0? to ?1?. reading the isr.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 37 7.5 fifo control register (fcr, page 0) fcr is used for enabling the fifos, clearing the fifos, setting transmit/receive fifo trigger level, and selecting the dma modes. table 12 shows fcr bit settings. table 12: fifo control register description bit symbol description 7:6 fcr[7:6] rx fifo trigger level select 00 : 8 characters (default) 01 : 16 characters 10 : 56 characters 11 : 60 characters flow control upper threshold level select 00 : 8 characters (default) 01 : 16 characters 10 : 56 characters 11 : 60 characters 5:4 fcr[5:4] tx fifo trigger level select 00 : 8 characters (default) 01 : 16 characters 10 : 32 characters 11 : 56 characters flow control lower threshold level select 00 : 0 character (default) 01 : 8 characters 10 : 16 characters 11 : 56 characters fcr[5:4] can only be modified and enabled when efr[4] is set. 3 fcr[3] dma mode select 0 : set dma mode 0 (default) 1 : set dma mode 1 2 fcr[2] tx fifo reset 0 : no tx fifo reset (default) 1 : reset tx fifo pointers and tx fifo level counter logic. this bit will return to ?0? after resetting fifo. 1 fcr[1] rx fifo reset 0 : no rx fifo reset (default) 1 : reset rx fifo pointers and rx fifo level counter logic. this bit will return to ?0? after resetting fifo. 0 fcr[0] fifo enable 0 : disable the tx and rx fifo (default). 1 : enable the tx and rx fifo
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 38 7.6 line control register (lcr, page 0) lcr controls the asynchronous data communi cation format. the word length, the number of stop bits, and the parity type are selected by writing the appropriat e bits to the lcr. table 13 shows lcr bit settings. table 13: line control register description bit symbol description 7 lcr[7] divisor latch enable. 0 : disable the divisor latch (default). 1 : enable the divisor latch. 6 lcr[6] break enable. 0 : no tx break condition output (default). 1 : forces txd output to ?0?, for alerting the communication terminal to a line break condition. 5 lcr[5] set stick parity. lcr[5:3] = xx0 : no parity is selected. lcr[5:3] = 0x1 : stick parity disabled. (default) lcr[5:3] = 101 : stick parity is forced to ?1?. lcr[5:3] = 111 : stick parity is forced to ?0?. 4 lcr[4] parity type select. lcr[5:3] =001 : odd parity is selected. lcr[5:3] =011 : even parity is selected. 3 lcr[3] parity enabled. 0 : no parity (default). 1 : a parity bit is generated during the transmission and the receiver checks for receive parity. 2 lcr[2] number of stop bits. lcr[2:0] = 0xx : 1 stop bit (word length = 5, 6, 7, 8). lcr[2:0] = 100 : 1.5 stop bits (word length = 5). lcr[2:0] = 11x or 1x1 : 2 stop bits (word length = 6, 7. 8). 1:0 lcr[1:0] word length bits. 00 : 5 bits (default). 01 : 6 bits. 10 : 7 bits. 11 : 8 bits.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 39 7.7 modem control register (mcr, page 0) mcr controls the interface with the modem , data set, or peripheral device that is emulating the modem. table 14 shows mcr bit settings. table 14: modem control register description bit symbol description 7 mcr[7] clock prescaler select. 0 : divide by 1 clock input (default). 1 : divide by 4 clock input. 6 mcr[6] page 2 select/xoff re-transmit access enable 0 : enable access to page 0 register when lcr[7] is ?0? (default). 1 : enable access to page 2 register and xoff re-transmit bit when lcr[7] is ?0?. 5 mcr[5] xon any enable. 0 : disable xon any (default). 1 : enable xon any. 4 mcr[4] internal loop back enable. 0 : disable loop back mode (default). 1 : enable internal loop back m ode. in this mode the mcr[3:0] signals are looped back into msr[7:4] and txd output is looped back to rxd input internally. 3 mcr[3] out2/interr upt output enable. 0 : intx outputs disabled (default). during loop back mode, out2 output ?0? and it controls msr[7] to ?1?. 1 : intx outputs enabled. during loop back mode, out2 output ?1? and it controls msr[7] to ?0?. out2 is not available as an output pin on the IN16C1058. 2 mcr[2] out1/xoff re-transmit enable. 0 : xoff re-transmit disable when mcr[6] is ?0?. during loop back mode, out1 output to ?0 ? and it controls msr[6] to ?1?. 1 : xoff re-transmit enable when mcr[6] is ?1?. during loop back mode, out1 output to ?1? and it controls msr[6] to ?0?. out1 is not available as an output pin on the IN16C1058. xoff re-transmit is operated with xrcr, refer to xrcr. 1 mcr[1] nrts output. 0 : force nrts output to ?1?. during loop back mode, controls msr[4] to ?1?. 1 : force nrts output to ?0?. during loop back mode, controls msr[4] to ?0?. 0 mcr[0] ndtr output. 0 : force ndtr output to ?1?. during loop back mode, controls msr[5] to ?1?. 1 : force ndtr output to ?0?. during loop back mode, controls msr[5] to ?0?.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 40 7.8 line status register (lsr, page 0) lsr provides the status of data transfers between the ua rt and the cpu. when lsr is read, lsr[4:2] reflect the error bits (bi, fe , pe) of the character at the top of the rx fifo. the errors in a character are identified by reading lsr and then reading rbr. reading lsr does not cause an increment of the rx fifo read pointer. the rx fifo read pointer is incremented by reading the rbr. table 15 shows lsr bit settings. table 15: line status register description bit symbol description 7 lsr[7] rx fifo data error indicator. 0 : no rx fifo error (default). 1 : at least one parity error, framing error, or break indication is in the rx fifo. this bit is cleared when there is no more error in any of characters in the rx fifo. 6 lsr[6] thr and tsr empty indicator. 0 : thr or tsr is not empty. 1 : thr and tsr are empty. 5 lsr[5] thr empty indicator. 0 : thr is not empty. 1 : thr is empty. it indicates that the uart is ready to accept a new character for transmission. in addition, it uses the uart to gener- ate an interrupt to the cpu when the thr empty interrupt enable is set to ?1?. 4 lsr[4] break interrupt indicator. 0 : no break condition (default). 1 : the receiver received a break signal (rxd was ?0? for at least one character frame time). in fifo mode, only one character is loaded into the rx fifo. 3 lsr[3] framing error indicator. 0 : no framing error (default). 1 : framing error. it indicates that the received character did not have a valid stop bit. 2 lsr[2] parity error indicator. 0 : no parity error (default). 1 : parity error. it indicates that the receive character did not have the correct even or odd parity, as selected by the lcr[4] 1 lsr[1] overrun error indicator. 0 : no overrun error (default). 1 : overrun error. it indicates that the character in the rbr or rx fifo was not read by the cpu, ther eby ignored the receiving character. 0 lsr[0] receive data ready indicator. 0 : no character in the rbr or rx fifo. 1 : at least one character in the rbr or rx fifo.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 41 7.9 modem status register (msr, page 0) msr provides the current stat us of control signals from modem or auxiliary devices. msr[3:0] are set to ?1? when input from modem changes and cleared to ?0? as soon as cpu reads msr. table 16 shows msr bit settings. table 16: modem status register description bit symbol description 7 msr[7] ndcd input status. complement of data carrier detect (ndcd) input. in loop back mode this bit is equivalent to out2 in the mcr. 6 msr[6] nri input status. complement of ring indicator (nri) input. in loop back mode this bit is equivalent to out1 in the mcr. 5 msr[5] ndsr input status. complement of data set ready (ndsr) input. in loop back mode this bit is equivalent to dtr in the mcr. 4 msr[4] ncts input status. complement of clear to send (ncts) input. in loop back mode this bit is equivalent to rts in the mcr. 3 msr[3] delta ndcd input status. 0 : no change on ndcd input (default). 1 : indicates that the ndcd input state has changed. 2 msr[2] delta nri input status. 0 : no change on nri input (default). 1 : indicates that the nri inpu t state changed from ?0? to ?1?. 1 msr[1] delta ndsr input status. 0 : no change on ndsr input (deault). 1 : indicates that the nd sr input state has changed. 0 msr[0] delta ncts input status. 0 : no change on ncts input (deault). 1 : indicates that the nc ts input state has changed. 7.10 scratch pad register (spr, page 0) this 8-bit read/write register does not control the uart in anyway. it is intended as a scratch pad register to be used by the programmer to hold data temporarily. 7.11 divisor latches (dll, dlm, page 1) two 8-bit registers which store the 16-bit di visor for generation of the clock in baud rate generator. dlm stores the most significant pa rt of the divisor, and dll stores the least significant part of the divisor. div isor of zero is not recommended. note that dll and dlm can only be written to before sleep mode is enabled, i.e., before ier[4] is set. chapter 6.7 describes the details of divisor latches.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 42 7.12 global interrupt control register (gicr, page 2) gicr is a register that internal eight 16c 1050 uarts share to use. it is used when determining whether each interrupt generated at eight 16c1050 uarts are transmitted to global interrupts or not. table 17 shows the gicr bit settings. table 17: global interrupt control register description bit symbol description 7 gicr[7] interrupt mask for 8 th uart channel 0 : interrupt masking. global interrupt is not generated even when the value of gisr[7] is ?1?. 1 : interrupt non-masking. global interrupt is generated when the value of gisr[7] is ?1?. 6 gicr[6] interrupt mask for 7 th uart channel 0 : interrupt masking. global interrupt is not generated even when the value of gisr[6] is ?1?. 1 : interrupt non-masking. global interrupt is generated when the value of gisr[6] is ?1?. 5 gicr[5] interrupt mask for 6 th uart channel 0 : interrupt masking. global interrupt is not generated even when the value of gisr[5] is ?1?. 1 : interrupt non-masking. global interrupt is generated when the value of gisr[5] is ?1?. 4 gicr[4] interrupt mask for 5 th uart channel 0 : interrupt masking. global interrupt is not generated even when the value of gisr[4] is ?1?. 1 : interrupt non-masking. global interrupt is generated when the value of gisr[4] is ?1?. 3 gicr[3] interrupt mask for 4 th uart channel 0 : interrupt masking. global interrupt is not generated even when the value of gisr[3] is ?1?. 1 : interrupt non-masking. global interrupt is generated when the value of gisr[3] is ?1?. 2 gicr[2] interrupt mask for 3 rd uart channel 0 : interrupt masking. global interrupt is not generated even when the value of gisr[2] is ?1?. 1 : interrupt non-masking. global interrupt is generated when the value of gisr[2] is ?1?. 1 gicr[1] interrupt mask for 2 nd uart channel 0 : interrupt masking. global interrupt is not generated even when the value of gisr[1] is ?1?. 1 : interrupt non-masking. global interrupt is generated when the value of gisr[1] is ?1?. 0 gicr[0] interrupt mask for 1 st uart channel 0 : interrupt masking. global interrupt is not generated even when the value of gisr[0] is ?1?.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 43 1 : interrupt non-masking. global interrupt is generated when the value of gisr[0] is ?1?. 7.13 global interrupt status register (gisr, page 2) gisr is a register that internal eight 16c1050 uarts share to use. it is used to verify the generation status of each interrupt of eight 16c1050 uarts when global interrupt function is enabled. table 18 shows gisr bit settings. table 18: global interrupt status register description bit symbol description 7 gisr[7] 8 th uart interrupt status. 0 : interrupt of 8 th uart channel was not generated. 1 : interrupt of 8 th uart channel was generated. 6 gisr[6] 7 th uart interrupt status. 0 : interrupt of 7 th uart channel was not generated. 1 : interrupt of 7 th uart channel was generated. gisr[5] 6 th uart interrupt status. 0 : interrupt of 6 th uart channel was not generated. 1 : interrupt of 6 th uart channel was generated. 4 gisr[4] 5 th uart interrupt status. 0 : interrupt of 5 th uart channel was not generated. 1 : interrupt of 5 th uart channel was generated. 3 gisr[3] 4 th uart interrupt status. 0 : interrupt of 4 th uart channel was not generated. 1 : interrupt of 4 th uart channel was generated. 2 gisr[2] 3 rd uart interrupt status. 0 : interrupt of 3 rd uart channel was not generated. 1 : interrupt of 3 rd uart channel was generated. 1 gisr[1] 2 nd uart interrupt status. 0 : interrupt of 2 nd uart channel was not generated. 1 : interrupt of 2 nd uart channel was generated. 0 gisr[0] 1 st uart interrupt status. 0 : interrupt of 1 st uart channel was not generated. 1 : interrupt of 1 st uart channel was generated. 7.14 transmit fifo count register (tcr, page 2) tcr shows the number of charac ters that can be stored in tx fifo. in 64-byte fifo mode, it consists of only tcr[ 6:0]. if the number of characte rs that can be stored in tx fifo is 0, it is shown as ?0000_0000? and if 64, it is shown as ?0100_0000?. in 256-byte fifo mode, it consists of is r[7] + tcr[7:0]. if the number of characters that can be stored in tx fifo is 0, it is shown as ?0_0000_0000? and if 255, it is shown as ?0_1111_1111?. and in case of the maximum number 256, it is shown as ?1_0000_0000?.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 44 7.15 receive fifo count register (rcr, page 2) rcr shows the number of characters that is st ored in rx fifo. in 64-byte fifo mode, it consists of only rcr[6:0]. if the number of characters that is st ored in rx fifo is 0, it is shown as ?0000_0000? and if 64, it is show n as ?0100_0000?. in 256-byte fifo mode, it consists of isr[6] + rcr[7:0]. if the number of characters that is stored in rx fifo is 0, it is shown as ?0_0000_0000? and if 255, it is shown as ?0_1111_1111?. and in case of the maximum number 256, it is shown as ?1_0000_0000?. 7.16 flow control status register (fsr, page 2) fsr show the status of operation of tx ha rdware flow control, rx hardware flow control, tx software flow control, and rx software flow control. table 19: flow control status register description bit symbol description 7:6 fsr[7:6] not used, always ?00?. 5 fsr[5] tx hardware flow control status. 0 : when fifo or auto-rts flow control is disabled. if fifo and auto-rts flow control is enabled, it means the number of data received in rx fifo at the first time is less than the value of fur, or it means the number of data in rx fifo was more than the value of fur and after the cpu read them, the number of data that remains unread is less than or equal to the value of flr. that is, uart reports external device that it can receive more characters. 1 : it shows that the number of data received in rx fifo exceeds the value of fur and uart reports external device that it cannot receiv e more data. if rx fifo has space to store more data, new data are stored in rx fifo but after it gets full, they are lost. for more details, refer to ?6 .2 hardware flow control?. 4 fsr[4] tx software flow control status. 0 : when fifo or software flow control is disabled. if fifo and software flow control is enabled, it means the number of data received in rx fifo at the first time is less than the value of fur, or it means the number of data in rx fifo was more than the value of fur and after the cpu read them, the number of data that remains unread after the cpu read the data received in rx fifo is less than or equal to the value of flr. that is, uart transmits xon character to report external device that it can receive more data. 1 : it shows that the number of data received in rx fifo exceeds the value of fur and transmitting xoff
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 45 character to report external device that it cannot receive more data. if rx fifo has space to store more data, new data are stored in rx fifo but after it gets full, they are lost. for more details, refer to ?6 .3 software flow control?. 3:2 fsr[3:2] not used, always ?00?. 1 fsr[1] rx hardware flow control status. 0 : when fifo or auto-cts flow control is disabled. if fifo and auto-cts flow control is enabled, ?0? is inputted in ncts pin and it means external device can receive more data. this time data in tx fifo are transmitted. 1 : if fifo and auto-cts flow control is enabled, ?1? is inputted in ncts pin and it means external device can not receive more data. this time data in tx fifo are not transmitted. for more details, refer to ?6 .2 hardware flow control?. 0 fsr[0] rx software flow control status. 0 : when fifo or rx software flow control is disabled. if fifo and rx software flow control is enabled, it means xoff character has never arrived or xon character arrived after xoff character had arrived(it means external device can receive more data). this time data in tx fifo are transmitted. 1 : if fifo and rx software flow control is enabled, it means xoff character has arrived and external device can not receive data any more. this time characters in tx fifo are not transmitted. for more details, refer to ?6 .3 software flow control?. 7.17 page select register (psr, page 3) if bfh is written in lcr, registers in page3 and page4 can be accessed. psr is used to determine which page to use. table 20 shows psr bit settings. table 20: page select register description bit symbol description 7:1 psr[7:1] access key. when writing data on psr to change page, access key must be correspondent. if the value of psr[7:1] is ?1010_010?, data is written on psr[0] and page can be selected. if psr[7:1] is read, it reads ?0000_000? which is irrespective of access key. 0 psr[0] page select. 0 : page 3 is selected (default). 1 : page 4 is selected.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 46 7.18 auto toggle control register (atr, page 3) atr controls the signals for controlling inpu t/output signals when using line interface as rs422 or rs485, so eliminates additional glue logic outside. table 21 shows atr bit settings. table 21: auto toggle control register description bit symbol description 7 atr[7] rxen polarity select. 0 : asserted output of rxen is ?0?. 1 : asserted output of rxen is ?1?. (default) 6 atr[6] rxen control mode select. only when atr[1:0] is ?11?; 0 : rxen is outputted as same as atr[7], irrespective of txd signal. (default) 1 : rxen is outputted as same as atr[7] when txd signal is not transmitting. and outputted as complement of atr[7] when txd signal is transmitting. 5 atr[5] txen polarity select. 0 : asserted output of tx en is ?0?. (default) 1 : asserted output of txen is ?1?. 4 atr[4] txen control mode select. 0 : txen is outputted as same as atr[5], irrespective of txd signal. (default) 1 : txen is outputted as complement of atr[5] when txd signal is not transmitting, and outputt ed as same as atr[5] when txd signal is transmitting.. 3:2 atr[3:2] not used, always ?00?. 1:0 atr[1:0] auto toggle enable. 00 : auto toggle is disabled (default). nrts_txen, ndtr_txen pin operate as nrts, ndtr. and each of ntxrdy_txen, nr xrdy_rxen operates as ntxrdy, nrxrdy. 01 : nrts_txen pin operates as txen. ndtr_txen pin operates as ndtr. and each of ntxrdy_txen, nrxrdy_rxen operates as ntxrdy, nrxrdy. 10 : ndtr_txen pin operates as txen. nrts_txen operates as nrts. and each of ntxrdy_txen, nrxrdy_rxen operates as ntxrdy, nrxrdy. 11 : ntxrdy_txen, nrxrdy_rxen pin operates as txen, rxen. nrts_txen, ndtr_txen operates as nrts, ndtr.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 47 7.19 enhanced feature register (efr, page 3) efr enables or disables the enhanced features of the uart. table 22 shows efr bit settings. table 22: enhanced feature register description bit symbol description 7 efr[7] auto-cts flow control enable. 0 : auto-cts flow control is disabled (default). 1 : auto-cts flow control is enabled. transmission stops when ncts pin is inputted ?1?. transmission resumes when ncts pin is inputted ?0?. 6 efr[6] auto-rts flow control enable. 0 : auto-rts flow control is disabled (default). 1 : auto-rts flow control is enabled. the nrts pin outputs ?1? when data in rx fifo fill above the fur. nrts pin outputs ?0? when data in rx fifo fall below the flr. 5 efr[5] special character detect. 0 : special character detect disabled (default). 1 : special character detect enabled. the uart compares each incoming character with data in xoff2 register. if a match occurs, the received data is transferred to rx fifo and isr[4] is set to ?1? to indicate that a special character has been detected. 4 efr[4] enhanced function bits enable. 0 : disables enhanced functions and writing to ier[7:4], fcr[5:4], mcr[7:5]. 1 : enables enhanced function ier[7:4], fcr[5:4], and mcr[7:5] can be modified, i.e., this bit is therefore a write enable. 3:0 efr[3:0] software flow control select. single character and dual sequential characters software flow control is supported. combinations of software flow control can be selected by programming these bits. see table 4 ?software flow control options (efr[3:0])? on page 15.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 48 7.23 additional feature register (afr, page 4) afr enables or disables the 256-byte fifo mode and controls the global interrupt. table 23 shows afr bit settings. table 23: additional feature register description bit symbol description 7:6 afr[7:6] not used, always ?00?. 5 afr[5] global interru pt polarity select 0 : gint pin outputs ?0? when interrupt is generated (default). 1 : gint pin outputs ?1? when interrupt is generated. 4 afr[4] global interrupt enable 0 : int0/gint pin is selected to int0 (default). 1 : int0/gint pin is selected to gint. 3:1 afr[3:1] not us ed, always ?000?. 0 afr[0] 256-byte fifo enable. 0 : 256-byte fifo mode is disabled and this means IN16C1058 operates as non fifo mode or 64-byte fifo mode (default). 1 : 256-byte fifo mode is enabled and isr[7:6] operates as 256-tx fifo empty and 256-rx fifo full. 7.24 xoff re-transmit count register (xrcr, page 4) xrcr operates only when software flow cont rol is enabled by efr[3:0] and xoff re- transmit function of mcr[2] is also en abled. and it determines the period of retransmission of xoff character. table 24 shows xrcr bit settings. table 24: xoff re-transmit count register description bit symbol description 7:2 xrcr[7:2] not used, always ?0000_00?. 1:0 xrcr[1:0] xoff re-t ransmit count select 00 : transmits xoff character whenever the number of received data is 1 during xoff status. (default) 01 : transmits xoff character whenever the number of received data is 4 during xoff status. 10 : transmits xoff character whenever the number of received data is 8 during xoff status. 11 : transmits xoff character whenever the number of received data is 16 during xoff status.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 49 7.25 transmit fifo trigger level register (ttr, page 4) operates only when 256-byte fifo mode is enabl ed. it sets the trigger level of 256-byte tx fifo for generating transmit interrupt. inte rrupt is generated when the number of data remained in tx fifo after transmitting through txd pin is less than the value of ttr. initial value is 128d, ?1000_0000?. and ?0 000_0000? must not be written. if written, unexpected operation may occur. 7.26 receive fifo trigger level register (rtr, page 4) operates only when 256-byte fifo mode is enabl ed. it sets the trigger level of 256-byte rx fifo for generating receive interrupt. in terrupt is generated wh en the number of data remained in rx fifo exceeds the value of rtr( this time, timeout or interrupt is valid). initial value is 128d, ?1000_0000?. and ?0 000_0000? must not be written. if written, unexpected operation may occur. 7.27 flow control upper threshold register (fur, page 4) it can be written only when 256-byte fifo mode is enabled and one of tx software flow control or auto-rts is enabled (in 64-byte mode, it cannot be wri tten but can be read only, and follows the value of trigger level set in fcr[5:4]). while tx software flow control is enabled, xoff character is transmitted wh en the number of data in rx fifo exceeds the value of fur. if auto-rts is enabled, ?1? is outputted on nrts pin to report that it cannot receive data any more. if both tx software flow control and auto-rts is enabled, xoff character is transmitted and ?1? is outputt ed on nrts pin. the value of fur must be larger than that of flr. 7.28 flow control lower threshold register (flr, page 4) it can be written only when 256-byte fifo mode is enabled and one of tx software flow control, or auto-rts is enabled (in 64-byte mode, it cannot be written but can be read only, and follows the value of trigger level set in fcr[7:6]). while tx software flow control is enabled, xon character is transmitted when the number of data in rx fifo is less than the value of fur only if xoff character is tran smitted before. if auto-rts is enabled, ?0? is outputted on nrts pin to report that it can receive more data. if both tx software flow control and auto-rts is enabled, xon characte r is transmitted only if xoff character is transmitted before and ?0? is outputted on nrts pin. the value of flr must be less than that of fur.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 50 table 25: IN16C1058 reset conditions registers reset state page 0 rbr [7:0] = ?xxxx_xxxx? ier [7:0] = ?0000_0000? fcr [7:0] = ?0000_0000? isr [7:0] = ?0000_0001? lcr [7:0] = ?0000_0000? mcr [7:0] = ?0000_0000? lsr [7:0] = ?0110_0000? msr [7:4] = ?0000? [3:0] = logic levels of the inputs inverted spr [7:0] = ?0000_0000? page 1 dll [7:0] = ?1111_1111? dlm [7:0] = ?1111_1111? page 2 gicr [7:0] = ?0000_0000? gisr [7:0] = ?0000_0000? tcr [7:0] = ?0000_0000? rcr [7:0] = ?0000_0000? fsr [7:0] = ?0000_0000? page 3 psr [7:0] = ?0000_0000? atr [7:0] = ?0000_0000? efr [7:0] = ?0000_0000? xon1 [7:0] = ?0000_0000? xon2 [7:0] = ?0000_0000? xoff1 [7:0] = ?0000_0000? xoff2 [7:0] = ?0000_0000? page 4 afr [7:0] = ?0000_0000? xrcr [7:0] = ?0000_0000? ttr [7:0] = ?1000_0000? rtr [7:0] = ?1000_0000? fur [7:0] = ?0000_0000? flr [7:0] = ?0000_0000? output signals reset state txd, nrts, ndtr logic 1 ntxrdy logic 0 nrxrdy logic 1 int tri-state condition = intsel is open or low state logic 0 = intsel is high state
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 51 8. option register descriptions IN16C1058 can be used as normal octal-uart with normal mode or expand up to 32 ports with systembase mio mode. option register set is provided to efficiently manage these ports in mio mode. these option regi sters contain the control information to manage serial ports and handles the interrupts from 8 channels as vectors so that device drivers can quickly access and resolve them. it is possible to immediately check which channel the interrupt occurred in through in terrupt poll register and nullify the interrupts by each channel through interrupt mask register. 8.1 option registers map in mio mode, IN16C1058s are connected with daisy chain and up to 4 devices can be connected. the daisy chain connection is co mposed of the first 8 ports, the second 8 ports, the third 8 ports and the last 8 ports . option registers can be accessed depending on where the device is located of the four places. for instance, if you were to access IN16C1058?s dir in second panel, first access address 05h through mio bus and then you can access dir1 to get the device inform ation of port9 ~ port16. if you were to access IN16C1058?s ipr in third panel, access address 11h through mio bus and then you can access ipr2 to get the devic e information of port17 ~ port24. by providing these option registers, IN16C1058 stores information of each serial port, allows creation of software drivers for gi ven communication specifications and provide users with various information. also, it is po ssible to form fast interrupt service routine by handling interrupts from uart as vectors. in the option register map on below chart, the same register set is providing 0 ~ 3. this address map shows the addresses that can be accessed through mio bus. mio bus can be expanded up to 32 ports by 8 ports. register set is designed as below to process basic unit information of the 8 ports. in a 32-port multiport application, as it is unknown where the IN16C1058 panel is going to be placed of the 4 places, the order of placement is analyzed with daisy chain and the access address for each panel is selected. for instance, for the first panel, corresponding option register set are dir0, iir0, imr0 and ipr0 and only mio bus access commands that correspond to these are responded. for the fourth panel, correspondi ng option register set are dir3, iir3, imr3 and ipr3 and only mio bus access commands that correspond to these are responded.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 52 table 26: option registers map addr[4:0] r/w descriptions 04h r/w dir0 (device information register for port1 ~ port8) 05h r/w dir1 (device information register for port9 ~ port16) 06h r/w dir2 (device information register for port17 ~ port24) 07h r/w dir3 (device information register for port25 ~ port32) 08h r/w iir0 (interface informati on register for port1 ~ port8) 09h r/w iir1 (interface informati on register for port9 ~ port16) 0ah r/w iir2 (interface information register for port17 ~ port24) 0bh r/w iir3 (interface information register for port25 ~ port32) 0ch r/w imr0 (interrupt mask register for port1 ~ port8) 0dh r/w imr1 (interrupt mask register for port9 ~ port16) 0eh r/w imr2 (interrupt mask register for port17 ~ port24) 0fh r/w imr3 (interrupt mask register for port25 ~ port32) 10h ro ipr0 (interrupt poll register for port1 ~ port8) 11h ro ipr1 (interrupt poll register for port9 ~ port16) 12h ro ipr2 (interrupt poll register for port17 ~ port24) 13h ro ipr3 (interrupt poll register for port25 ~ port32) 8.2 device information register table 27: device information register bit name descriptions 7 u[3:0] shows the type of uart. 0h : use 16c550 uart core 1h : use 16c1050 uart core others: not defined 6 5 4 3 o[3:0] shows the uart?s operating frequency. (oscillator/crystal) 0h: use 1.8432mhz uart clock 1h: use 3.6864mhz uart clock 2h: use 7.3728mhz uart clock 3h: use 14.7456mhz uart clock 4h: use 29.4912mhz uart clock 5h: use 58.9854mhz uart clock others: not defined 2 1 0
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 53 8.3 interface information register table 28: interface information register bit name descriptions 7 0b hardwired to 0 6 0b 5 i[1:0] type of serial port interface 0h: rs232 interface 1h: rs422 interface 2h: rs485 interface 4h: unknown 4 3 trxen[1:0] in rs422/485 communication, set the signal line used as tx/rx enable signal 0h: rts 1h: dtr 2h: exclusive signal line (txen/rxen) 3h: not defined 2 1 0b hardwired to 0 0 0b 8.4 interrupt mask register in normal mode, uart?s internal registers can be accessed through ncs and uart?s gicr (global interrupt control register) is used for configuring 8 uart channel?s interrupt mask. gicr is the same register as ipr in this case. imr access option register through nopt control signal in mio mode and gicr access uart internal register through ncs or nuart signal. gicr and imr are same region and IN16C1058 provides different methods of accessing them. table 29: interrupt mask register bit name descriptions 7 m7 1h: enables port8 interrupt. 0h : disables port8 interrupt. (default) 6 m6 1h: enables port7 interrupt. 0h : disables port7 interrupt. (default) 5 m5 1h: enables port6 interrupt. 0h : disables port6 interrupt. (default) 4 m4 1h: enables port5 interrupt. 0h : disables port5 interrupt. (default) 3 m3 1h: enables port4 interrupt. 0h : disables port4 interrupt. (default) 2 m2 1h: enables port3 interrupt. 0h : disables port3 interrupt. (default) 1 m1 1h: enables port2 interrupt. 0h : disables port2 interrupt. (default) 0 m0 1h: enables port1 interrupt. 0h : disables port1 interrupt. (default)
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 54 8.5 interrupt poll register in normal mode, uart?s internal registers can be accessed through ncs and uart?s gisr (global interrupt status register) is used for checking 8 uart channel?s interrupt status. gisr is the same register as ipr in this case. ipr access option register through nopt control signal in mio mode and gisr access uart internal register through ncs or nuart signal. gisr and imr are same region and IN16C1058 provides different methods of accessing them. table 30: interrupt poll register bit name descriptions 7 p7 1h: interrupt not occurred in port8. 0h : interrupt occurred in port8. 6 p6 1h: interrupt not occurred in port7. 0h : interrupt occurred in port7. 5 p5 1h: interrupt not occurred in port6. 0h : interrupt occurred in port6. 4 p4 1h: interrupt not occurred in port5. 0h : interrupt occurred in port5. 3 p3 1h: interrupt not occurred in port4. 0h : interrupt occurred in port4. 2 p2 1h: interrupt not occurred in port3. 0h : interrupt occurred in port3. 1 p1 1h: interrupt not occurred in port2. 0h : interrupt occurred in port2. 0 p0 1h: interrupt not occurred in port1. 0h : interrupt occurred in port1.
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 55 9. programmer?s guide the base set of registers that is used during high-speed data transfer has a straightforward access method. the extended function registers require special access bits to be decoded along with the address lines. the following guide will help with programming these registers. no te that the descriptions below are for individual register access. some streamlining through interleaving can be obtained when programming all the registers. table 31: register programming guide command action set baud rate to value1, value2 read lcr, then save in temp set lcr to 80h set dll to value1 set dlm to value2 set lcr to temp set xon1, xoff1 to value1, value2 read lcr, then save in temp set lcr to bfh set xon1 to value1 set xoff1 to value2 set lcr to temp set xon2, xoff2 to value1, value2 read lcr, then save in temp set lcr to bfh set xon2 to value1 set xoff2 to value2 set lcr to temp set software flow control mode to value read lcr, then save in temp set lcr to bfh set efr to value set lcr to temp set flow control thresh old for 64-byte fifo mode 1) set fcr to ?0000_xxx1? ? set fur to 8, set flr to 0 2) set fcr to ?0101_xxx1? ? set fur to 16, set flr to 8 3) set fcr to ?1010_xxx1? ? set fur to 56, set flr to 16 4) set fcr to ?1111_xxx1? ? set fur to 60, set flr to 56 set flow control threshold for 256-byte fifo mode set fcr to ?xxxx_xxx1? read lcr, then save in temp set lcr to bfh set psr to a5h set afr to 01h
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 56 table 31: register programming guide? continued command action set fur to upper threshold value set flr to lower threshold value set psr to a4h set lcr to temp set tx fifo / rx fifo interrupt trigger level for 64-byte fifo mode 1) set fcr to ?0000_xxx1? ? set rtr to 8, set ttr to 8 2) set fcr to ?0101_xxx1? ? set rtr to 16, set ttr to 16 3) set fcr to ?1010_xxx1? ? set rtr to 56, set ttr to 32 4) set fcr to ?1111_xxx1? ? set rtr to 60, set ttr to 56 set tx fifo / rx fifo interrupt trigger level for 256-byte fifo mode set fcr to ?xxxx_xxx1? read lcr, then save in temp set lcr to bfh set psr to a5h set afr to 01h set ttr to tx fifo trigger level value set rtr to rx fifo trigger level value set psr to a4h set lcr to temp read flow control status read lcr, then save in temp1 read mcr, then save in temp2 set lcr to (?0111_1111? and temp1) set mcr to (?0100_0000? or temp2) read fsr, then save in temp3 pass temp3 back to host set mcr to temp2 set lcr to temp1 read tx fifo / rx fifo count valu e read lcr, then save in temp1 read mcr, then save in temp2 set lcr to (?0111_1111? and temp1) set mcr to (?0100_0000? or temp2) read tcr, then save in temp3 read rcr, then save in temp4 pass temp3 back to host pass temp4 back to host set mcr to temp2 set lcr to temp1
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 57 table 31: register programming guide? continued command action read 256-byte tx fifo empty status / rx fifo full status set fcr to ?xxxx_xxx1? read lcr, then save in temp1 set lcr to bfh set psr to a5h set afr to 01h set psr to a4h set lcr to temp1 read isr, then save in temp2 pass temp2 back to host enable xoff re-transmit read lcr, then save in temp1 set lcr to not bfh read mcr, then save in temp2 set mcr to (?0100_0000? or temp2) set mcr to (?0100_0100? or temp2) set mcr to (?1011_1111? and temp2) set mcr to temp2 set lcr to temp1 disable xoff re-transmit read lcr, then save in temp1 set lcr to not bfh read mcr, then save in temp2 set mcr to (?0100_0000? or temp2) set mcr to (?1011_1011? and temp2) set mcr to temp2 set lcr to temp1 set prescaler value to di vide-by-1 or 4 read lcr, then save in temp1 set lcr to bfh read efr, then save in temp2 set efr to (?0001_0000? or temp2) set lcr to 00h read mcr, then save in temp3 if divide-by-1 = ok then set mcr to (?0111_1111? and temp3) else set mcr to (?1000_0000? or temp3) set lcr to bfh set efr to temp2 set lcr to temp1
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 58 table 32: IN16C1058 programming guide command action initialize process 1. set baud rate to 0001h read lcr, then save in temp set lcr to 80h set dll to 01h set dlm to 00h set lcr to temp 2. set ttr to 20h set lcr to bfh set psr to a5h set ttr to 20h 3. set rtr to 80h set rtr to 80h 4. enable 256-byte fifo set afr to 01h 5. set line control register to 8-data but, no parity, 1 stop bit set psr to a4h set lcr to 03h 6. enable tx, rx interrupts set ier to 03h serial output process 1. tx interrupt is generated and jumped to interrupt service routine 2. read isr 3. check tx interrupt status 4. read tx fifo count 5. read data 6. output tx 5. read data 6. output tx read isr, then save in temp1 if temp1 = xx00_0100b then goto rx interrupt service routine else if temp1 = xx00_0010b then goto tx interrupt service routine else return from inte rrupt service routine rx interrupt service routine: ?.. tx interrupt service routine: read mcr, then save in temp2 set mcr to (temp2 or 40h) read tcr, then save in temp3 set mcr to temp2 if temp1[7] = 1b then for (cnt = 0; cnt <= 127; cnt++) read tx_data from tx_user_buffer set thr to tx_data else if temp3 > 128 then for (cnt = 0; cnt <= 127; cnt++) read tx_data from tx_user_buffer set thr to tx_data
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 59 table 32: IN16C1058 programming guide? continued command action 5. read data 6. output tx else for (cnt = 0; cnt < temp3; cnt++) read tx_data from tx_user_buffer set thr to tx_data return from interr upt service routine serial input process 1. rx interrupt is generated and jumped to interrupt service routine 2. read isr 3. check tx interrupt status 4. read rx fifo count 5. read rx data 5. read data read isr, then save in temp1 if temp1 = xx00_0100b then goto rx interrupt service routine else if temp1 = xx00_0010b then goto tx interrupt service routine else return from inte rrupt service routine tx interrupt service routine: ?.. rx interrupt service routine: read mcr, then save in temp2 set mcr to (temp2 or 40h) read rcr, then save in temp3 set mcr to temp2 if temp1[6] = 1b then for (cnt = 0; cnt <= 255; cnt++) read rbr, save in rx_user_buffer else for (cnt = 0; cnt < temp3; cnt++) read rbr, save in rx_user_buffer return from interr upt service routine
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 60 10. electrical characteristics 10.1 absolute maximum ratings table 32: absolute maximum ratings symbol parameter min max unit v dd dc supply voltage -0.5 7.0 v v in input voltage -0.5 v dd + 0.5 v v out output voltage range 0 v dd + 0.5 v t stg storage temperature -65 150 absolute maximum ratings are those values beyond wh ich damage to the device may occur. exposure to these conditions or beyond those i ndicated may adversely affect device reliabi lity. functional operation under absolute maximum ratings is not implied. 10.2 power consumption table 33: IN16C1058 power consumption power consumption minimum typical maximum unit IN16C1058-tq - 3.270 3.597 w 10.3 dc electrical characteristics table 34: dc electrical characteristics symbol parameter 0 100 conditions min max v dd v il low level input voltage -0.5v 0.3v dd 2.7v~3.6v guaranteed input low voltage v ih high level input voltage 0.7v dd v dd +0.5v 2.7v~3.6v guaranteed input high voltage v ol low level output voltage v ss +0.1v 2.7v i ol = 0.8ma v oh high level output voltage v dd -0.1v 2.7v i oh = 0.8ma i i input current at minimum voltage 1ma 2.7v~3.6v input = 5.5v
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 61 10.4 ac electrical characteristics table 31: ac electrical characteristics symbol parameter min max unit t rd pulse duration, nior low 24 ns t csr set up time, ncs valid before nior low ? 10 ns t ar set up time, a2~a0 valid before nior low ? 10 ns t ra hold time, a2~a0 valid after nior high ? 2 ns t rcs hold time, ncs valid after nior high ? 0 ns t frc delay time, t ar +t rd +t rc ? 54 ns t rc delay time, nior high to nior or niow low 20 ns t wr pulse duration, niow 24 ns t csw setup time, ncs va lid before niow 10 ns t aw setup time, a7~a0 va lid before niow 10 ns t ds setup time, d7~d0 valid before niow 15 ns t wa hold time, a7~a0 valid after niow 2 ns t wcs hold time, ncs va lid after niow 2 ns t dh hold time, d7~d0 valid after niow 5 ns t fwc delay time, t aw +t wr +t wc 54 ns t wc delay time, niow to niow or nior 20 ns t rvd enable time, nior to d7~d0 valid 24 ns t hz disable time, nior to d7~d0 released 4 ns t irs delay time, int to txdx at start 8 24 rclk t sti delay time, txdx at start to int 8 8 rclk t si delay time, niow high or low (wr thr) to int 16 32 rclk t sxa delay time, txdx at start to ntxrdy 8 rclk t hr propagation delay time, niow(wr thr) to int 12 ns t ir propagation delay time, nior(rd iir) to int 12 ns t wxi propagation delay time, niow(wr thr) to ntxrdy 10 ns t sint delay time, stop bit to int or stop bit to nrxrdy or read rbr to set interrupt 1 rclk t rint propagation delay time, read rbr/lsr to int /lsr interrupt 12 ns t rint propagation delay time, nior rclk to nrxrdy 12 ns t mdo propagation delay time, niow(wr mcr) to nrtsx, ndtrx 12 ns t sim propagation delay time, modem input nctsx, ndsrx, and ndcdx to int 12 ns t rim propagation delay time, nior(rd msr) to interrupt 3 ns
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 62 t sim propagation delay time, nrix to int 12 ns ? the internal address strobe is always in active state. ? in the fifo mode, td1= xxns (min) between reads of the fifo and the status register. t t ra t ior# t csx# t t t a[2:0] v a lid da ta hz v a lid a ddress d[7:0] rvd rc iow# rd rcs ar t csr t active frc figure 10: read cycle timing fwc wr t dh active t t wa t t d[7:0] t wc t a[2:0] t valid data t valid address csx# aw wcs csw ds iow# ior# figure 11: write cycle timing
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 63 hr t irs t t sti si hr txdx t parity t intx ir iow# start ior# start (wr thr) (rd iir) stop(1-2) data(5-8) t figure 12: transmitter timing start stop (wr thr) iow# parity txdx data txrdy# sxa t wxi t by te #1 figure 13: transmitter ready mode 0 timing sxa t txdx txrdy# t stop iow# fifo full start parity wxi data by te #16 (wr thr) figure 14: transmitter ready mode 1 timing
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 64 (fifo at or above t (rd lsr) sint rint ior# (rd rbr) lsi interrupt (fcr6, 7 = 0, 0) data(5-8) start intx(trigger ior# level interrupt clock sample rint t rxdx t trigger level) stop (fifo below parity trigger level) figure 15: receiver fifo first byte (sets rbr) timing trigger level clock stop trigger level) sint (rd lsr) t sint t ior# rint (rd rbr) t rint trigger level) t rxdx (fifo at or above sample interrupt top byte of fifo (fifo below read from fifo lsi interrupt previous byte ior# timeout or figure 16: receiver fifo after first byte (after rbr set) timing
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 65 rxdx t rxrdy# rint (rd rbr) ior# clock sample sint t stop (first byte) figure 17: receiver ready mode 0 timing sample sint reaches the rxdx t trigger level) t ior# rint rxrdy# clock (first byte that stop (rd rbr) figure 18: receiver ready mode 1 timing sim rtsx#, dtrx# (wr mcr) t t rim t t sim rim t sim t iow# mdo (rd msr) mdo ior# t intx ctsx#, dsrx#, dcdx# rix# figure 19: modem control timing
IN16C1058 octal uart with 256-byte fifo june 2009 rev 1.0 66 11.package outline 128-pin tqfp: thin plastic octal flat package; body 20 20 1.2 mm 22.0 15.5 0.27 20.0 0.17 1.20 max 1.05 max 0.5 1.00 0 - 7 0.10 0.45 0.75 figure 20: IN16C1058 128-pin tqfp outline (mechanical drawing) note : 1. all dimensions are in millimeters. 2. falls within ansi y14.5-1982


▲Up To Search▲   

 
Price & Availability of IN16C1058

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X